![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Filesystems, Disks and Memory Discuss NAS, SAN, RAID, Robotic Libraries, backup devices, RAM, DRAM, SCSI, IDE, EIDE topics here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Basic question re. permission denied | justinwyllie | UNIX for Dummies Questions & Answers | 2 | 03-07-2008 11:36 AM |
| Tricky script question | budrito | Shell Programming and Scripting | 3 | 06-30-2006 03:06 AM |
| Tricky Sed | bestbuyernc | Shell Programming and Scripting | 2 | 11-22-2005 01:03 PM |
| The file permission | ust | UNIX for Dummies Questions & Answers | 2 | 05-05-2005 09:18 AM |
| Tricky one... | saabir | Windows & DOS: Issues & Discussions | 1 | 12-12-2002 05:34 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Tricky File Permission Question
I'm trying to answer the following question about file permissions in Unix. Consider a file with the following permissions:
rwx---r-- I am not the owner of this file, but I am a member of the group of this file. My question is: do I have read access to this file? I thought the answer was YES, since the world has read access to this file. But, a sysadmin is telling me that the answer is NO, since the group access bits are all off. Can someone provide an authoritative answer? I would try to answer this for myself, but at the moment, I don't have access to a Unix box with sufficient priveleges. Thanks. -- Hook |
|
||||
|
The way Unix handles the permission is by reading the permission from the left to the right.
So If the permission looks like rwx---r-- And you are not the owner but are a group member you cannot read this file. ##############Demo on HP-UX 11i, Logged on as rene Home dir /home/rene $ id uid=102(rene) gid=20(users) $ ls -la total 14 drwxr-xr-x 2 rene users 1024 Jul 16 21:17 . drwxr-xr-x 4 root root 96 Jul 9 23:13 .. -rw-r--r-- 1 rene users 832 Jul 9 23:13 .cshrc -rw-r--r-- 1 rene users 347 Jul 9 23:13 .exrc -rw-r--r-- 1 rene users 334 Jul 9 23:13 .login -rw-r--r-- 1 rene users 439 Jul 9 23:13 .profile -rw------- 1 rene users 146 Jul 16 21:22 .sh_history -rwx---r-- 1 root users 32 Jul 16 21:19 permtest $ cat permtest cat: Cannot open permtest: Permission denied $ # Permissions are read from the left to the right and it first tells that the group users have NO permissions bits set. -- I hope this helps |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|