Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Samba Permissions Nightmare

Featured Replies

I'm having a complete nightmare with samba permissions. Essentially I have a Plex folder inside of a share which I'm making available over the network using samba. Its a private share. 

 

I have the following based on information I found on the forums:

image.png.6d5fa88b76f748448b2b803946be1ce8.png

 

I attempt to add a file using `touch`:

image.png.c5a568be30b8dbbb80eff9c1ba9767c4.png

 

This does get created but with the following:

image.png.f76326698e7456eabb8a500f79847b16.png

 

Creating a folder works:
image.png.3d2f433f1b6f8b4326d8d98fb148750e.png

 

However permissions are off:
image.png.bf91333ca7eca92db09226eba5440ecb.png

 

Share settings:

image.thumb.png.50b3aade84099ce834ba93734192054f.png

 

Is anyone able to help here? Its driving me mad.

  • Community Expert

What are the PGID, PUID, UMASK variables set to in the Container variables on the Plex Docker?

 

34 minutes ago, JRascagneres said:

I have the following based on information I found on the forums:

image.png.6d5fa88b76f748448b2b803946be1ce8.png

 

Are these setting in Settings   >>>   SMB    >>>  SMB Extras   tab/section?

 

 

36 minutes ago, JRascagneres said:

I attempt to add a file using `touch`:

image.png.c5a568be30b8dbbb80eff9c1ba9767c4.png

 

 

37 minutes ago, JRascagneres said:

Creating a folder works:
image.png.3d2f433f1b6f8b4326d8d98fb148750e.png

 

Where are running these command from--  Is it a Docker?

  • Community Expert

From Tools,  run the "New Permissions" tool against only the Share that has the permissions issue.  That should temporarily fix the problem.

Edited by Frank1940

  • Author

@Frank1940 Thanks for your response. Sooo...

"New Permissions" works for existing files obviously but doesn't help when creating new ones.

 

Quote

Are these setting in Settings   >>>   SMB    >>>  SMB Extras   tab/section?

Yes

 

Quote

Where are running these command from--  Is it a Docker?

Typically the files / folders are indeed created through docker (but on another system connected through samba)

 

Quote

What are the PGID, PUID, UMASK variables set to in the Container variables on the Plex Docker?

PGID - 1000 --> Just the user I have on my system, again connected to unraid via samba.

PUID - 1000 --> As above

 

No UMASK set.

  • Community Expert

Record your current settings.  Then set as follows:

 

PGID:  100

PUID:   99

UMASK:  000

 

Then test...

 

  • Author

@Frank1940 Apologies for late delay. It did seem to help but the issue is I only write certain files to unraid over the network and keep metadata locally. Obviously having the PGID, PUID set to those causes issues when writing locally. UMASK did seem to help somewhat though. Is there no way to just force samba to operate with those settings?

Thanks!

  • Community Expert
On 12/11/2022 at 9:43 PM, JRascagneres said:

have the following based on information I found on the forums:

image.png.6d5fa88b76f748448b2b803946be1ce8.png

I would have thought this would do that.   Are you actually using SMB to write the data to the Unraid array or you using NFS or a Docker?  Both of these latter two will completely ignore the settings in the SMB configuration files. 

 

Here is the Link to the parameters for the smb.conf (and by extension to smb-extra.conf or any other 'include' files):

 

https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html

 

It contains information from the true Gurus on the subject of Samba which is the version of SMB used by Unraid...

  • Author

@Frank1940

 

I have SMB setup on my server 

//192.168.1.203/main-array /mnt/storage-server-01 cifs vers=3.0,credentials=/etc/storage-server-creds,rw,uid=nobody,gid=users,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm 0 0

 

I then have docker on the server which writes to /mnt/storage-server-01 etc.... 

  • Community Expert
27 minutes ago, JRascagneres said:

@Frank1940

 

I have SMB setup on my server 

//192.168.1.203/main-array /mnt/storage-server-01 cifs vers=3.0,credentials=/etc/storage-server-creds,rw,uid=nobody,gid=users,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm 0 0

 

I then have docker on the server which writes to /mnt/storage-server-01 etc.... 

 

I am totally confused at this point.  /mnt/storage-server-01  is actually in RAM IF it is on the Unraid server!     Please use the GUI terminal and capture the screen shot of the output of the following command:

ls -al /mnt

It should something like this:

 image.png.d24ec868d57a4e1e2b6e8858d54cb4cf.png

 

Also post up the diagnostics file of your server.

 

I am also going to ping @dlandon  to see if he has some insights into what might be happening. 

 

A couple comments about your setup.

  • You should use UD to mount a remote share.  UD manages everything for you - mounting/unmounting, and proper share setups.
  • You shouldn't be adding share settings to smb-extra.conf.  The settings in that file are global and share settings could overwrite your global settings.
  • Writing files in a command prompt on the mount point will not respect the samba permission settings because you are not going through samba.
  • Author

@Frank1940Sorry for the confusion. The /mnt/storage-server-01 is on the server thats connected to unraid. Thats the mount point for the unraid share remotely. 

 

@dlandonThe writes should be going through samba as the screenshots of the writes are on a remote server.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.