rmdir bug?
Hactar
eben at gate.net
Thu Dec 13 22:56:02 GMT 2001
On Thu, 13 Dec 2001, Lindeman, Andrew wrote:
> I have a share called pub. In that share, there is a folder that I want to
> block access to. So, I chmoded it 0700 and chowned it root. In my smb.conf
> file, I set the "guest account" parameter to "netshare", an unprivialized
> user. I also set the "guest only" parameter to "yes" No remote computer
> can "cd" into the directory, but all can delete (rmdir) the folder. The
> folder is chmoded -rwx------ and root owns the file. Is this a bug or my
> misunderstanding?
If the directory is empty, then there are no files to delete recursively,
thus the parent's permissions govern who may delete the directory. To
prevent the directory from being removed, try adding a file to it, maybe
something as innucuous as a file named "...".
13/0 eben at pc.ttyp6:~/test > mkdir foo ; chmod 000 foo ; su -c 'chown root.root foo' ; ls -l
Password:
total 1
1 d--------- 2 root root 1024 Dec 14 01:42 foo/
14/0 eben at pc.ttyp6:~/test > rmdir foo ; ls -l
total 0
15/0 eben at pc.ttyp6:~/test > mkdir foo ; touch foo/... ; chmod 000 foo ; su -c 'chown root.root foo' ; ls -l
Password:
total 1
1 d--------- 2 root root 1024 Dec 14 01:43 foo/
16/0 eben at pc.ttyp6:~/test > rmdir foo ; ls -l
rmdir: foo: Directory not empty
total 1
1 d--------- 2 root root 1024 Dec 14 01:43 foo/
17/0 eben at pc.ttyp6:~/test >
--
-eben eQbWeEnR at gTaYtUeI.nOePt home.tampabay.rr.com/hactar
CAPRICORN: The stars say you're an exciting and wonderful person... but you
know they're lying. If I were you, I'd lock my doors and windows and never
never never leave my house again. -- Weird Al, _Your Horoscope for Today_
More information about the samba
mailing list