29.01.2013 Views

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

GPFS: Administration and Programming Reference - IRA Home

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Each <strong>GPFS</strong> file or directory has an access ACL that determines its access privileges. These ACLs control<br />

who is allowed to read or write at the file or directory level, as well as who is allowed to change the ACL<br />

itself.<br />

In addition to an access ACL, a directory may also have a default ACL. If present, the default ACL is used<br />

as a base for the access ACL of every object created in that directory. This allows a user to protect all files<br />

in a directory without explicitly setting an ACL for each one.<br />

When a new object is created, <strong>and</strong> the parent directory has a default ACL, the entries of the default ACL<br />

are copied to the new object’s access ACL. After that, the base permissions for user, mask (or group if<br />

mask is not defined), <strong>and</strong> other, are changed to their intersection with the corresponding permissions from<br />

the mode parameter in the function that creates the object.<br />

If the new object is a directory, its default ACL is set to the default ACL of the parent directory. If the parent<br />

directory does not have a default ACL, the initial access ACL of newly created objects consists only of the<br />

three required entries (user, group, other). The values of these entries are based on the mode parameter<br />

in the function that creates the object <strong>and</strong> the umask currently in effect for the process.<br />

Administrative tasks associated with traditional <strong>GPFS</strong> ACLs are:<br />

1. “Setting traditional <strong>GPFS</strong> access control lists”<br />

2. “Displaying traditional <strong>GPFS</strong> access control lists” on page 47<br />

3. “Changing traditional <strong>GPFS</strong> access control lists” on page 48<br />

4. “Deleting traditional <strong>GPFS</strong> access control lists” on page 48<br />

Setting traditional <strong>GPFS</strong> access control lists<br />

Use the mmputacl comm<strong>and</strong> to set the access ACL of a file or subdirectory, or the default ACL of a<br />

directory. For example, to set the ACL for a file named project2.history, we can create a file named<br />

project2.acl that contains this:<br />

user::rwxc<br />

group::rwx-<br />

other::--x-<br />

mask::rwxc<br />

user:alpha:r-xc<br />

group:audit:rw--<br />

group:system:rwx-<br />

In the project2.acl file above,<br />

v The first three lines are the required ACL entries setting permissions for the file’s owner, the owner’s<br />

group, <strong>and</strong> for processes that are not covered by any other ACL entry.<br />

v The last three lines contain named entries for specific users <strong>and</strong> groups.<br />

v Because the ACL contains named entries for specific users <strong>and</strong> groups, the fourth line contains the<br />

required mask entry, which is applied to all named entries (entries other than the user <strong>and</strong> other).<br />

Once you are satisfied that the correct permissions are set in the ACL file, you can apply them to the<br />

target file with the mmputacl comm<strong>and</strong>. For example, to set permissions contained in the file project2.acl<br />

for the file project2.history, enter:<br />

mmputacl -i project2.acl project2.history<br />

To confirm the changes, enter:<br />

mmgetacl project2.history<br />

The information sent to st<strong>and</strong>ard output is similar to:<br />

46 <strong>GPFS</strong>: <strong>Administration</strong> <strong>and</strong> <strong>Programming</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!