Log In | Not a Member? | Support | |
SYNTAX
SetPrivilege folderName1 [folderName2]… [-d users] [-f users] DESCRIPTION The SetPrivilege tool allows you to set the access privileges for folders on a file server. Privileges can be set for three categories of users: the owner (yourself), the group, and everyone. The types of access privileges are as follows: • read-only access to the files (-f) • limited access; users can see the folders and directories and list their contents (-d) • write-privileged access (-m) INPUT None OUTPUT None, unless you specify the -i option. In this case SetPrivilege writes information about the access privileges of the specified folders to standard output in the form of SetPrivilege commands. STATUS
SetPrivilege can return the following status codes:
PARAMETERS folderName1 [folderName2]… Specifies one or more AppleShare folders by pathname. OPTIONS -d users Enables or disables limited access for the specified users, allowing them to see files, directories, and folders. When enabled, this access privilege allows a user to view folders and directories and to list, but not read, their contents. users
Specifies the categories of users with a string (of one, two, or three characters) containing the following letters. Uppercase letters enable privileges; lowercase letters disable them.)
For letters not in the string, the respective privilege remains unchanged. For example, the following option enables limited access privileges for everyone inside and outside the group, while access privileges for the owner remain the same as before: -d GE -f users Enables or disables read-only access of files for the specified users. When enabled, this access privilege allows a user to read, but not modify, files contained in the specified folders. The users parameter is the same as for -d. -g newGroup Changes the group to newGroup. -i Writes to standard output folder information specifying access privileges for all categories of users. The output appears in the form of a SetPrivilege command. Note that you cannot use this option in conjunction with any other options except -r. -m users Enables or disables write-privileged access of files and directories for the specified users. When enabled, this access privilege allows a user to modify files and directories in the specified folders. The users parameter is the same as for -d. -o newOwner Changes the owner to newOwner. -r Applies changes recursively to the enclosed folders. EXAMPLES The following command line sets each type of access privilege for all three categories of users. The owner (Peter) has unlimited access privileges to the files within Server:personal:Peter. Going one step down in access privileges, the users within the group can read the files but not modify them. Users outside the group do not have any access privileges. SetPrivilege -r -f OGe -d OGe -m Oge "Server:personal:Peter" The easiest way to use SetPrivilege is to use the -i option to get information on folders in the form of a SetPrivilege command and then edit the privileges as desired. For example, to change the privileges for Server:Joe you would follow these steps: Execute the command SetPrivilege -i Server:Joe to obtain the current privileges: SetPrivilege Server:Joe -o Joe -g Team -d OGE -f OGE -m OGE This shows that everyone has unlimited access privileges to the folder Joe. Edit the output (adjusting the privileges as desired) and execute the new command line: SetPrivilege Server:Joe -o Joe -g Team -d Oge -f Oge -m Oge Now only Joe (the owner) can see the files and folders within Server:Joe and make changes to them. All other users no longer have any access privileges.
|