[Samba] Anyone can create empty files (v 3.5.11)
monyo at monyo.com
Sat Sep 24 02:04:50 MDT 2011
From: Dan Carpenter <dan.carpenter at oracle.com>
Date: Fri, 23 Sep 2011 09:38:56 +0300
> I've mounted my cifs partition with a username and password and to
> test whether I had my permissions right, I did:
> $ sudo su testuser
> $ touch asdf
> touch: cannot touch `asdf': Permission denied
> It says permission denied, but the `asdf' file is still created. I
> can't write any data to it, but I can create empty files.
How does "ls -l asdf"?
By default, the permission and owner for a created file is forcibily
set on "root 644 because CIFS server (Windows server) essentially does
not have semantics of permission. That sometimes causes an odd
behavior that you have met.
Try noperm option as mentioned:
TAKAHASHI Motonobu <monyo at samba.gr.jp>
More information about the samba