Jump to content

Samba Permissions Nightmare


Recommended Posts

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.

Link to comment

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?

Link to comment

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

Link to comment
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...

Link to comment
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. 

 

Link to comment

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

×
×
  • Create New...