glite-catalog-chmod

glite-catalog-chmod — Change the basic permissions of a logical file in the catalog

Synopsis

glite-catalog-chmod [ -h ] [ -q ] [ -s SERVICE ] [ -V ] [ -v ] [ -b NUM ] [ -R ] MODE LFN...

DESCRIPTION

glite-catalog-chmod is a command-line tool for changing basic permissions on files and directories in the catalog.

MODE is a list of permission modification descriptions, separated by commas. Each modification description consists of three components: the subject specifier, the operation specifier and the list of permission bits to change.

The subject specifier controls whose access to the file or directory will be changed. It is a combination of the letters 'ugoa' meaning the user who owns the file (u), any user in the file's group (g), any other users (o) or everyone (a). Specifying no letters is the same as giving 'a' (everyone).

The operation specifier controls how the permission is changed. Exactly one of the symbols '+', '-' or '=' should be specified. Operator '+' causes the permission bits following the operator to be added to the existing permissions. Operator '-' causes the specified permission bits to be cleared. Operator '=' sets the permission to the specified value regardless of the previous permissions on the file.

The last part of MODE contains the new permissions for the affected users:

  • p - allow to change the permissions

  • d - delete the entry

  • r - read the file

  • w - write to the file

  • l - list contents

  • x - execute

  • g - get the meta data of the file

  • s - set the meta data of the file

OPTIONS

-h

Print a short help message on parameters and usage, and exit.

-q

Quiet operation.

-s SERVICE

Specifies the service endpoint to use. If SERVICE starts with http://, https:// or httpg://, then it is taken as a direct service endpoint URL. Otherwise SERVICE is taken as a service instance name and Service Discovery is invoked to look up the endpoint.

If this option is not specified, Service Discovery will be invoked and the first available catalog will be used. If the Service Discovery fails, the program will exit with an error.

Note

If this option is not specified, only services with a known good status will be returned by Service Discovery. However if you explicitely specify a service name or an endpoint, the tool will try to use it regardless of its registered status.

Note

If you specify an HTTP URL with an empty host name, the tool will dump the SOAP requests to the standard output and will read the SOAP reply from stdin.

-v

Increases the verbosity level.

-V

Print the version number and exit.

-b NUM

Set the number of modifications that will be sent in a single batch operation.

-R

Change the mode of files and directories recursively.

MODE

Permissions to change.

LFN

Name of the files and/or directories to modify. The following URI formats are recognized:

LFN - Logical File Name. It can be either <path> or lfn://<path>. <path> must be absolute and must start with a slash (/). <path> may contain wildcards (? meaning any character and * meaning any string). Wildcards may appear at any part of the path, so you can specify constructs like /*/*/foo meaning every file named foo in any subdirecory two levels below the root directory.

GUID - Globally Unique Identifier. It must be given in the form of guid://<GUID>. The LFN belonging to the GUID will be looked up in the catalog and used for subsequent operations. GUID must have the form XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX, where every X means a hexadecimal digit.

SURL - Storage URL. This is an URL of the form srm://<path>. The tool will look up the LFN for which the SURL is registered as a replica and will use that LFN for subsequent operations.

ENVIRONMENT VARIABLES

GLITE_SD_FIREMAN_TYPE

Specifies the type of the Fireman catlog service to use during service discovery. The default value is org.glite.FiremanCatalog.

GLITE_SD_SEINDEX_TYPE

Specifies the type of the Storage Element Index service to use during service discovery. The default value is org.glite.SEIndex.

GLITE_SD_METADATA_TYPE

Specifies the type of the Metadata service to use during service discovery. The default value is org.glite.Metadata.

SEE ALSO

glite-catalog-setacl(1)

EXAMPLES

glite-catalog-chmod a+r /foo/bar
glite-catalog-chmod go-pdwxs,u+ws /foo/bar