SMB writes wrong permissions (SOLVED)


Recommended Posts

I log into my unraid from windows or mac with a specific user name. That works all fine and I can upload and change files.

However, turns out the SMB uploaded files are owned by that user and not accessible by other users even though the share they are in is a public, non-secure one.

I can fix this with the "Safe new perms" tool, but it's a recurring issue.

 

What do I need to change to maintain proper file permissions (nobody/users) when uploading via SMB?

Edited by froland80
marking as solved
Link to comment
  • froland80 changed the title to SMB writes wrong permissions (SOLVED)

This shouldn't really need to be 'handled' at all.  Unraid forces the use of nobody.users and I can see why TBH.  But if they're going to do that, they should really default all the built in writing to their chosen permissions format.  File sharing has never been the strong suit of unraid unfortunately, but with a bit of tweaking it can work OK.

Link to comment
  • 1 year later...
On 1/28/2021 at 4:27 PM, froland80 said:

After a bit more digging found several related posts (after understanding that this is about forcing a user over SMB):

Solution is to add the following lines to your /boot/config/smb-extra.conf

 

[Global]

  force create mode = 0666

  force directory mode = 0777

  force user = nobody

  force group = users

  create mask = 0666

 

Marking as solved.

I'm still having a slight issue with this -> I've applied the changes above

 

Something continues to change my Pictures SMB folder from 0777 to 0770. Is there somehow to create a new user that can't modify folder permissions?

Link to comment
15 minutes ago, Rick_Sanchez said:

Something continues to change my Pictures SMB folder from 0777 to 0770. Is there somehow to create a new user that can't modify folder permissions?

 

Do you have a Docker or VM that has access to this folder?  The reason that I mention this is that either of these can write directly to the array bypassing SMB. 

Edited by Frank1940
Link to comment
  • 10 months later...
On 1/28/2021 at 10:27 PM, froland80 said:

After a bit more digging found several related posts (after understanding that this is about forcing a user over SMB):

Solution is to add the following lines to your /boot/config/smb-extra.conf

 

[Global]

  force create mode = 0666

  force directory mode = 0777

  force user = nobody

  force group = users

  create mask = 0666

 

Marking as solved.

 

You can paste this in [server address]/Settings/SMB, which will put it in the exact same file.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.