Page 1 of 1

Mapping user/permission between NAS share & Linux client mount

Posted: 19 May 2015 09:13
by StuPiddaz
I just started using NAS4Free (9.3.0.2 [1391]), and although I'm pretty close, I can't seem to get this quite right:

On the NAS:

I've created a share where clients can store their backups:

Code: Select all

drwxrwx---   4 backup  backup     4B May 18 11:57 backups
...subfolders in the backups directory:

Code: Select all

drwxrwx---  2 sally   backup     27 Apr 22 08:50 SallyPC
drwxrwx---  3 john    backup  18466 May 18 13:32 john-desktop
On the (Linux) client:

Backup software on John's and Sally's devices connect to the backups share using their 'john' and 'sally' credentials (respectively). John (an admin) is a member of the backup group, so he can see both his and Sally's backups. Sally is a temp, she is not a member of the backup group, so she only has access/visibility to the SallyPC subfolder and its contents.

In John's /etc/fstab file:

Code: Select all

    …
//nas-server/backups  /mnt/backups  cifs  dir_mode=0755,file_mode=0644,iocharset=utf8,_netdev,nosetuids,rw,uid=john,gid=john,cred=/home/john/.nas-backup-cred  0  0
    …
The problem:

When John's backup software writes to /mnt/backups/john-desktop:

Code: Select all

Dirs:   drwxr-xr-x    …instead of…   drwxrwx---
Files:  -rw-r--r--    …instead of…   -rw-rw----
Checking or unchecking Enable permission inheritance for this SMB share doesn't seem to make a difference. If I'm reading the documentation correctly, dir_mode and file_mode are ignored if the server does not support the CIFS Unix extensions.

Any help understanding this better will be greatly appreciated.

Re: Mapping user/permission between NAS share & Linux client mount

Posted: 20 May 2015 08:38
by arxaios
Check the Permissions you gave on the mount points where you have your shares in .!

Go to menu Disks -> Mount Point . (See if they are in conflict with your Shares...!!)

Good luck.
P.S. If your are using Linux Clients better use NFS Shares instead.

Re: Mapping user/permission between NAS share & Linux client mount

Posted: 22 May 2015 06:38
by StuPiddaz
Check the Permissions you gave on the mount points where you have your shares in .!

Go to menu Disks -> Mount Point . (See if they are in conflict with your Shares...!!)
I neglected to mention that I'm using ZFS, so my mount points (if that's the correct terminology) are defined in Disks|ZFS|Datasets|Dataset, and owners and permissions are set the way I want them...

Owner: backup
Group: backup
Mode:

Code: Select all

Owner  = r w x
Group  = r w x
Others = - - -
P.S. If you are using Linux Clients, better use NFS Shares instead.
Actually, I'm doing both. I'd prefer to use NFS for all my linux VMs and workstation, but some other devices in the house can only deal with SMB shares.

Re: Mapping user/permission between NAS share & Linux client mount

Posted: 22 Jun 2015 06:36
by KUbo_0
have the same problem on my both n4f 9.3 servers.
mount permission checked.. seems like it samba's issue, because wincsp shows all right

Re: Mapping user/permission between NAS share & Linux client mount

Posted: 22 Jun 2015 12:46
by mel
Use Auxiliary parameters Services|CIFS/SMB|Share|Edit

Code: Select all

create mask = 0660
directory mask = 0770