Re: can't delete a file although permissions seem correct

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

 



On Wed, 2004-12-08 at 15:02 +0200, Marius Andreiana wrote:
> Hi
> 
> I've encountered a weird situation where I can't delete a file:
> (reproductile on rh9 and fc3, no selinux)
> 
> $ id
> uid=500(marius) gid=500(marius) groups=500(marius)
> 
> mkdir d1
> >d1/a.txt
> chmod 571 d1
> chmod 460 d1/*
> ls -al d1/
> total 12
> dr-xrwx--x   2 marius marius 4096 Dec  8 15:01 .
> drwxrwxrwt  17 root   root   4096 Dec  8 15:01 ..
> -r--rw----   1 marius marius    0 Dec  8 15:01 a.txt
> 
> rm d1/a.txt
> rm: remove write-protected regular empty file `d1/a.txt'? y
> rm: cannot remove `d1/a.txt': Permission denied
> 
> The directory d2 has write permissions for my group, and file it's
> writable by group. I belong to that group, why can't the file be
> removed?
> 
> Thanks in advance for enlightenment

There is precedence in applying permissions, and they are not additive.
If the user is allowed/denied any permission, that is the applicable
permissions used.

In other words; If you are the user, ONLY the user permissions are
applied.  If you are not the user, but are a member of the group, then
ONLY the group permissions apply.  If you are not the user, AND are not
a member of the group, then only the other permissions apply  



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux