[Samba] Strange permission problem when mounting a share

TAKAHASHI Motonobu monyo at monyo.com
Sun Sep 4 02:24:05 MDT 2011

2011/9/4 Fabrice <fabriceaemail-list at yahoo.fr>:
> Now, I want to *mount the folder in my user home directory.* I am not using
> Dophin anymore, I do everything from the terminal.
> $ sudo mount -t cifs // /home/myuser/Pictures/
> $ cd Pictures/
> $ touch test-konsole.txt
> touch: cannot touch `test-konsole.txt': Permission denied
> *But the file is created anyway*... with the incorrect permissions
> (rwxr-xr-x instead of rwxrwxr-x)
> -rwxr-xr-x  1 nobody  nobody         0 Aug 28 19:01 test-konsole.txt
>  So what am I missing here ? Could it be related to this problem ?

Unlike NFS,
you have to notice that permission of the mounted directory is not inherited
from those of the mouting directory's but is set with dir_mode and file_mode
option because CIFS can not treat "permission" basically.


$ sudo mount -t cifs -o rw,noperm //


$ sudo mount -t cifs -o rw,file_mode=0666,dir_mode=0777
// /home/myuser/Pictures/

TAKAHASHI Motonobu <monyo at samba.gr.jp>

More information about the samba mailing list