Re: permisssion

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

 



On 09Feb2011 21:43, Raj Har <raj4list@xxxxxxxxx> wrote:
|                i am little bit confused.
| 
| #mkdir /java
| #chmod 754 /java
| i can run "ls" command but i can not run "ls -l" command on /java directory
| from  other user.

The other user is using the "4" in that permission mode - just "read".
For a directory, "read" means you may see the filenames within it.
However, you cannot _access_ the files in the directory without "search"
(permission 1, aka "x").

Since "ls -l" needs to run the stat(2) system call in order to report
the size, dates, permissions, etc on files, "ls -l" cannot work since "x"
permission is not available. Plain "ls" works because it only reports
file names.

| #chmod 756 /php
| i can not create file in /php directory without execute permission but
| without execute permission i can run "ls" command???

Exactly as above. Creating a file is an "access" too, and thus requires
"x" permission. Again, plain "ls" works because you have "read"
permission here.

Generally, to do anything _useful_ with the _contents_ of a directory
you need "x" permission, and of course the appropriate "r" or "w"
permission for what you're doing ("w" for create/destroy/rename).

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

The perl5 internals are a complete mess. It's like Jenga - to get the perl5
tower taller and do something new you select a block somewhere in the middle,
with trepidation pull it out slowly, and then carefully balance it somewhere
new, hoping the whole edifice won't collapse as a result.
- Nicholas Clark, restating an insight of Simon Cozens

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list


[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux