[Gllug] file permissions on redhat 6

Dagfinn Ilmari Mannsåker ilmari at ilmari.org
Tue Aug 24 10:55:33 UTC 2010


Alain Williams <addw at phcomp.co.uk> writes:

> On Tue, Aug 24, 2010 at 11:37:18AM +0100, - Tethys wrote:
>> On Tue, Aug 24, 2010 at 11:03 AM, Alain Williams <addw at phcomp.co.uk> wrote:
>> 
>> > I am playing with a beta of the up coming redhat enterprise 6.
>> >
>> > I notice that at the end of the permissions with 'ls -l' there is an extra character,
>> > it always seems to be a '.'. Can someone point me to where I can find out what it is
>> > about. The 'man' command don't help:
>> >
>> >        -rw-r--r--. 1 root root 908 Jul 29 18:25 /etc/passwd
>> 
>> It shows that the file has an SELinux security context. It's been in
>> Fedora for quite a while now. From the GNU Coreutils docs:
>
> Thanks.
>
> It is going to break a hell of a lot of shell scripts that parse the output of 'ls'.

In that case those scripts are broken, and have been for a long time
(ever since POSIX ACLs were introduced, at least).

Quoth the Single Unix Standard v3 (aka POSIX)
<http://www.opengroup.org/onlinepubs/009695399/utilities/ls.html>:

| The file mode written under the -l, -g, -n, and -o  options shall
| consist of the following format:
|
| "%c%s%s%s%c", <entry type>, <owner permissions>,
|     <group permissions>, <other permissions>,
|     <optional alternate access method flag>
|
| The <optional alternate access method flag> shall be a single <space>
| if there is no alternate or additional access control method
| associated with the file; otherwise, a printable character shall be
| used.

And in the informative rationale section:

| An early proposal specified that the optional alternate access method
| flag had to be '+' if there was an alternate access method used on the
| file or <space> if there was not. This was changed to be <space> if
| there is not and a single printable character if there is. This was
| done for three reasons:
|
| There are historical implementations using characters other than '+'.
|
| There are implementations that vary this character used in that position
| to distinguish between various alternate access methods in use.
|
| The standard developers did not want to preclude future specifications
| that might need a way to specify more than one alternate access method.
|
| Nonetheless, implementations providing a single alternate access method
| are encouraged to use '+'.


-- 
ilmari
"A disappointingly low fraction of the human race is,
 at any given time, on fire." - Stig Sandbeck Mathisen

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list