Re: directory permissions set to 600?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 07/20/2010 05:17 PM, Robert Heller wrote:
>> um... on a directory, the X bit means you can LS the contents of the
>> directory.   of course, root ignores this anyways and overrides it.
>
> Note that execute access is only needed on a directory if you want to
> list its contents (eg ls).  If you know ahead of time the name of the
> file in the directory you seek to access, you don't need execute access
> on the directory.

You and John are both incorrect.  Read access is sufficient to get a 
list of files and directories in a given directory.  The execute bit on 
a directory is required to access the directory's contents.  If a 
directory is 'rw-' for a user (other than root), the user can get a list 
of its contents using 'ls'.  However, since the contents are not 
available, the user cannot stat() the names to determine what type of 
file they are, their size, their owner/group, etc.  The user will also 
not be able to chdir to a sub-directory without execute access.

The fact that Doug has a directory with octal mode 0600 is probably an 
oversight which goes unnoticed because the root user gets the privilege 
of lax security checks.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux