Path: utzoo!attcan!uunet!husc6!bloom-beacon!gatech!rutgers!topaz.rutgers.edu!ron From: ron@topaz.rutgers.edu (Ron Natalie) Newsgroups: comp.unix.questions Subject: Re: File Access - Does Owner Access Override Group Access? Message-ID: Date: 20 May 88 18:19:14 GMT References: <1268@kodak.UUCP> Distribution: na Organization: Rutgers Univ., New Brunswick, N.J. Lines: 28 >I created a text file in my home directory. It had read and write access >for the owner (that's me) and read only access at both the group and world >level. I then did a chmod on the file and gave it 077 as the access mask. >This gave it full access to both group and world but took away all access >at the owner level. I did an ls -gl and a groups command and the file did >belong to the group of which I was a member. However, when I tried to cat >the file, the system returned the message 'Permission denied'. > >Does this mean that owner level access overrides group and/or world access? In a word, YES. The if you are the owner, owner overrides everything else. If you are in the group, then group permissions override the world permission. Note that on System V, you are only in one group at a time, so the group must match the processes group for group permissions to apply, for BSD systems there is a vector of typically eight groups that you can be in simoultaneously. Group permissions apply when any of those groups match the file. >Even stranger - I next tried to remove the file with the rm command and >it worked! File permissions do not prevent deletion. Deletion is an operation that is performed on the directory the file is in. You have write permission on your directory evidentally. Write permission on a directory means the ability to create and remove files therein. There is no such function as writing into the directory itself (as you would right into a file). -Ron