Re: [SLUG] confused about file permissions

From: Eben King (eben1@tampabay.rr.com)
Date: Sat Oct 29 2005 - 20:47:43 EDT


On Sat, 29 Oct 2005, Sick Twist wrote:

> >From: "Ian C. Blenke" <ian@blenke.com>
> >Reply-To: slug@nks.net
> >To: slug@nks.net
> >Subject: Re: [SLUG] confused about file permissions
> >Date: Sat, 29 Oct 2005 19:55:07 -0400
> >
> ><snipation>
> >Confused yet? ;)
> >
> >- Ian C. Blenke <ian@blenke.com> http://ian.blenke.com/
>
> Just to clarify: In order to delete empty directory "foo", I only need write
> access to foo's parent directory--correct?

No, you need execute permission as well:

[eben@pc tmp]$ ls -l 1
total 4.0K
4.0K d--------- 2 root root 4.0K Oct 29 20:37 foo/
[eben@pc tmp]$ chmod 200 1
[eben@pc tmp]$ ls -ld 1
4.0K d-w------- 3 eben eben 4.0K Oct 29 20:37 1/
[eben@pc tmp]$ rmdir 1/foo
rmdir: `1/foo': Permission denied
[eben@pc tmp]$ chmod 100 1
[eben@pc tmp]$ ls -ld 1
4.0K d--x------ 3 eben eben 4.0K Oct 29 20:45 1/
[eben@pc tmp]$ rmdir 1/foo
rmdir: `1/foo': Permission denied
[eben@pc tmp]$ chmod 300 1
[eben@pc tmp]$ ls -ld 1
4.0K d-wx------ 3 eben eben 4.0K Oct 29 20:37 1/
[eben@pc tmp]$ rmdir 1/foo
[eben@pc tmp]$

Haven't got a handle on _why_ yet...

-- 
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar
              
      He who will not reason is a bigot; he who cannot is a fool;
        and he who dares not is a slave.  -Sir William Drummond

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:57:56 EDT