You are not logged in.

#1 2011-08-28 23:03:11

Cobaltounet
Member
Registered: 2010-11-10
Posts: 9

Samba permissions (yes again !)

Hello

I have been struggling with a permission issue with Samba my whole afternoon, and it really (I mean really) starts to upset me.

The user I am testing with is a member of the group nobody.
I have a share defined as it :

security = share

[public]
   path = /home/smbshare
   public = yes
   only guest = yes
   writable = yes
   printable = no
   create mask = 0775
   force create mode = 0775

The permissions on my smbshare folder (and the files within) are :

drwxrwsr-x 10 nobody      nobody  4096 Jun  5 17:35 smbshare

When I am using dolphin to browse my share, everything is working as expected. I do not have to enter a pwd and I can create, rename, delete without any problems.
For instance if I go to :

smb://127.0.0.1/public/Pictures/

And create a file with Dolphin, the permissions are exactly what I want :

-rwxrwxr-x  1 nobody  nobody         2 May 20 16:33 test-dolphin.txt

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 //127.0.0.1/public/Pictures /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

I am not an expert with the samba setup, so what am I missing here ?
Thanks!

Last edited by Cobaltounet (2011-08-28 23:03:31)

Offline

#2 2011-08-29 19:16:47

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: Samba permissions (yes again !)

The "user" nobody is a very special account, I know that much, and will not work with most apps that a user would need to start.  It's a non-login user account which is used for security purposes to deny an attacker a proper login shell.  I'm pretty sure Samba treats the account & user group "nobody" in a special fashion, at least that's what is in my memory.  You might want to check the Samba website's official documentation about this.

Offline

Board footer

Powered by FluxBB