Jump to content
wgstarks

[6.3.5]permission issues with SMB shares when connecting from a Mac

10 posts in this topic Last Reply

Recommended Posts

@Squid has suggested that I start a defect report regarding this problem.

 

When connecting from a Mac to a public share with enhanced OS X support enabled using anonymous credentials I get the following permissions on written files-

Brunnhilde login: root
Password: 
Linux 4.9.30-unRAID.
Last login: Mon Sep  4 12:09:10 -0400 2017 on /dev/pts/0 from 10.0.1.190.
root@Brunnhilde:~# cd /mnt/user/Media/Temp
root@Brunnhilde:/mnt/user/Media/Temp# ls -al
total 112
drwxrwxrwx 1 nobody users     47 Sep  4 15:17 ./
drwxrwxrwx 1 nobody users     30 Sep  4 15:17 ../
-rw-r--r-- 1 nobody users 107685 Jun 13  2016 NCSBA\ Honey\ Competition\ Rules.pdf
root@Brunnhilde:/mnt/user/Media/Temp#   

 

When connecting using my user credentials and writing the same file I get this-

Brunnhilde login: root
Password: 
Linux 4.9.30-unRAID.
Last login: Mon Sep  4 15:18:06 -0400 2017 on /dev/pts/0 from 10.0.1.190.
root@Brunnhilde:~# cd /mnt/user/Media/Temp
root@Brunnhilde:/mnt/user/Media/Temp# ls -al
total 112
drwxrwxrwx 1 nobody   users     47 Sep  4 15:25 ./
drwxrwxrwx 1 nobody   users     50 Sep  4 15:24 ../
-rw-r--r-- 1 wgstarks users 107685 Jun 13  2016 NCSBA\ Honey\ Competition\ Rules.pdf
root@Brunnhilde:/mnt/user/Media/Temp# 

It's my understanding that neither file has the correct permissions and I've been having huge problems when writing files from my Mac to shares that are also being written to by unraid dockers using default permissions.

 

Edit: This error does not occur for me if Enhanced OS X Support is disabled.

Edited by wgstarks

Share this post


Link to post

To elaborate, the permissions of -rw-r--r-- wgstarks:users being set will not allow another user to be able to modify the files even if they have RW permissions on the file(s)

 

Files created on Windows will have permissions of -rw-rw-rw username:users which will allow other users to modify them according to the share permissions.

Share this post


Link to post

Been doing a little more digging into this issue and found these 2 postings in an email support thread https://lists.samba.org/archive/samba/2016-April/199642.html and the reply https://lists.samba.org/archive/samba/2016-April/199643.html.

 

The report there was that this problem was solved using-

fruit:nfs_aces = no

Not sure how to set this in unRAID so I can test it?

Share this post


Link to post

Doing a little testing with fruit:nfs_aces=no set and Enhanced OS X Support enabled on a test share-

Brunnhilde login: root
Password: 
Linux 4.9.30-unRAID.
root@Brunnhilde:~# cd /mnt/user/test
root@Brunnhilde:/mnt/user/test# ls -al
total 60
drwxrwxrwx 1 nobody   users    54 Dec 31 14:24 ./
drwxrwxrwx 1 nobody   users   103 Dec 31 14:24 ../
-rw-rw-rw- 1 wgstarks users  4096 Dec 31 14:24 ._Pi\ Template.pdf
-rw-rw-rw- 1 wgstarks users 55135 May 21  2016 Pi\ Template.pdf
root@Brunnhilde:/mnt/user/test# 

Perhaps @Squid can confirm, but I think this has resulted in proper permissions being set to the file.

Share this post


Link to post

Those permissions will allow users set within unRaid with write access to modify the files no problems

Share this post


Link to post

To follow-up, it looks like this is enabled if you turn on "Enhanced OS X inoperability". Though even with that on, I still can't delete files in certain shares.

Share this post


Link to post
35 minutes ago, revealingtoomuch said:

@wgstarks Sorry to jump in here, but I think this might be similar to my problem. Did you set 


fruit:nfs_aces = no

in Settings - SMB - Samba extra configuration?

Correct. I've only had a chance to test with El Capitan, but so far this seems to have corrected my problems.

Share this post


Link to post
15 minutes ago, revealingtoomuch said:

To follow-up, it looks like this is enabled if you turn on "Enhanced OS X inoperability". Though even with that on, I still can't delete files in certain shares.

vfs fruit is enabled when you set enhanced OS X  interoperability to yes. Leaving it set to no will likely result in correct file permissions but very slow file browsing. Folders with large numbers of items may take several minutes to load.

 

Making changes to your SMB configurations won't correct permissions on files you've already written. You'll need to use tools>docker safe new permissions for that. It will hopefully result in correct permissions being applied to future writes. Again, I've only had a chance to test this with El Capitan.

Share this post


Link to post
On 12/31/2017 at 2:34 PM, wgstarks said:

Doing a little testing with fruit:nfs_aces=no set and Enhanced OS X Support enabled on a test share-

Unfortunately it seems this setting is no longer working for me with unRAID 6.6.x. Currently the only solution I can find is disabling Enhanced OSX interoperability.

Edited by wgstarks

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now