You are not logged in.

#1 2017-09-28 05:04:32

Sandman0984
Member
Registered: 2017-09-28
Posts: 2

CIFS share permissions issue

I'm having an issue with a CIFS share after mounting it.  I have a Windows Server 2008R2 domain controller (winserver) and a FreeNAS server (storage), both hosing SMB shares.  The FreeNAS server is authenticating against the Active Directory domain and has NTFS permissions set on all SMB shares.  I am trying to mount and access a share from the FreeNAS server to ArchLinux into the following mount point "/home/frank/Network_Shares".  The share DOES mount successfully using the following command:

"sudo mount -t cifs //storage/users/frank /home/frank/Network_Shares --verbose -o credentials=/usr/local/cifs_credentials/frank.cifs,rw"

BEFORE MOUNTING the share, the permissions of the "Network_Shares" folder is "rwxr-xr-x   frank:users". 
AFTER successfully mounting the share, the permissions of the "Network_Shares" folder change to: "rwxrwx---   20500:20512" and I do not have permissions to access the mount point.

The user in the credential file I am using has administrative rights on the Windows domain and the share, I can access the smb share successfully through Thunar with the same credentials (smb://storage/users/frank) with read/write access.

As a contrast, if I mount a share from the Windows server with the same command into the same share:

"sudo mount -t cifs //winserver/shares /home/frank/Network_Shares --verbose -o credentials=/usr/local/cifs_credentials/frank.cifs,rw"

The "Network_Shares" folder permissions are: "rwxr-xr-x   root:root" and I do have read/write access to the share.  Same credential file with no modification.

I'm wondering if FreeNAS is doing something wierd with the permissions.  Any suggestions?

Offline

#2 2017-09-28 05:33:23

Sandman0984
Member
Registered: 2017-09-28
Posts: 2

Re: CIFS share permissions issue

Ok, I think I solved my own issue actually.  I neglected to add the "uid" and "gid" options in the mount command.  Adding  uid=frank,gid=users allowed my local user and group access to the share.  It appears if these are left out, the uid and gid of the configured users on the share are replicated to the mount point.  Since these were active directory users and groups and not unix or my specific mount user, the uids were not recognized and permission was denied to the mount.  Setting them specifically on the mount point allows the mount to be accessed by those users / group members, all using the credential provided in the credential file.

Resolved.

Offline

#3 2017-09-28 06:54:26

seth
Member
Registered: 2012-09-03
Posts: 51,017

Re: CIFS share permissions issue

Please edit fir first post and prepend "[SOLVED] " to the subject line, thanks.

Offline

Board footer

Powered by FluxBB