09.12.2012 Views

SUSE LINUX Documentation - Index of

SUSE LINUX Documentation - Index of

SUSE LINUX Documentation - Index of

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

mask::rwx<br />

other::---<br />

148 Reference<br />

In addition to the entries initiated for the user geeko and the group mascots, a mask<br />

entry has been generated. This mask entry is set automatically so that all permissions<br />

are effective. setfacl automatically adapts existing mask entries to the settings<br />

modified, unless you deactivate this feature with -n. mask defines the maximum effective<br />

access permissions for all entries in the group class. This includes named user,<br />

named group, and owning group. The group class permission bits displayed by ls -dl<br />

mydir now correspond to the mask entry.<br />

drwxrwx---+ ... tux project3 ... mydir<br />

The first column <strong>of</strong> the output contains an additional + to indicate that there is an extended<br />

ACL for this item.<br />

According to the output <strong>of</strong> the ls command, the permissions for the mask entry include<br />

write access. Traditionally, such permission bits would mean that the owning group<br />

(here project3) also has write access to the directory mydir. However, the effective<br />

access permissions for the owning group correspond to the overlapping portion <strong>of</strong> the<br />

permissions defined for the owning group and for the mask—which is r-x in our example<br />

(see Table 5.2, “Masking Access Permissions” (page 145)). As far as the effective<br />

permissions <strong>of</strong> the owning group in this example are concerned, nothing has changed<br />

even after the addition <strong>of</strong> the ACL entries.<br />

Edit the mask entry with setfacl or chmod. For example, use chmod g-w mydir.<br />

ls -dl mydir then shows:<br />

drwxr-x---+ ... tux project3 ... mydir<br />

getfacl mydir provides the following output:<br />

# file: mydir<br />

# owner: tux<br />

# group: project3<br />

user::rwx<br />

user:geeko:rwx # effective: r-x<br />

group::r-x<br />

group:mascots:rwx # effective: r-x<br />

mask::r-x<br />

other::---<br />

After executing the chmod command to remove the write permission from the group<br />

class bits, the output <strong>of</strong> the ls command is sufficient to see that the mask bits must<br />

have changed accordingly: write permission is again limited to the owner <strong>of</strong> mydir.

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

Saved successfully!

Ooh no, something went wrong!