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@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@pc.ttyp6:~/test > rmdir foo ; ls -l
total 0
15/0 eben@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@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@pc.ttyp6:~/test >
--
-eben eQbWeEnR@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_