paulmorabi Posted November 13, 2023 Share Posted November 13, 2023 H, I've created a new cache and some files over to it. I have a Linux VM running that accesses the files by NFS and this is where the problems begin. I have a user paul and group users on both the Unraid machine and the Linux VM but the uid is I guess different. I can change the permissions so they are 777 and can then edit/remove files. The user is listed as 99 so its reflecting the UID of the "paul" user on the Unraid host? If I want to change the owner of the files on the VM to be the "paul" user within it, I get an operation not permitted error. Part of the reason I am looking to do this is because I am running several docker containers on the host and permissions are based off of it being this user. I'm using the public setting for the NFS share and the fstab entry for the share is as follows: Quote 192.168.1.xx:/mnt/user/media /media/share nfs cto 0 0 I know its probably something simple here but have been searching for hours and endlessly confused. Quote Link to comment
Frank1940 Posted November 13, 2023 Share Posted November 13, 2023 Try googling linux change uid of user and see if you can change the user UID on the VM to match that on Unraid. (I would also suggest making that user-- paul ---be in the 'users' group on Unraid and be in the same GID on the VM.) Quote Link to comment
Frank1940 Posted November 13, 2023 Share Posted November 13, 2023 I did a bit of looking and you could edit the UID and GID in the passwd and smbpasswd files in the /config directory on the boot drive. Make backups FIRST!!!! (If you google those file names, you can find out what the various fields correspond to.) I would think you could do the same on the VM. (In Unraid, these files are in the /etc directory...) Quote Link to comment
paulmorabi Posted November 13, 2023 Author Share Posted November 13, 2023 1 hour ago, Frank1940 said: Try googling linux change uid of user and see if you can change the user UID on the VM to match that on Unraid. (I would also suggest making that user-- paul ---be in the 'users' group on Unraid and be in the same GID on the VM.) Hmm on both systems the uid is 1000 and the "users" group gid is 100. Still though, if I chown to "paul:users" on Unraid, it gives me 99 and group users on the VM. This shouldn't be the case? Quote Link to comment
Frank1940 Posted November 13, 2023 Share Posted November 13, 2023 Let me explain how Unraid appears to handle permissions on SMB shares. The default Unraid permission on files is 666 and for directories is 777. This means that member of the group has the same permissions as owner. Therefore, the actual owner of the file/directory is not important since all of the Share Access users are members of the group -- users (GID = 100). See this to show what I mean: and, this from the passwd file: nobody:x:99:100:nobody:/:/bin/false smbuser:x:1000:100:Universial SMB user:/:/bin/false user:x:1001:100:Super User for SMB:/:/bin/false Notice that there are three different users but only one group shown in this file. Yet all of these files are completely accessible for any type of file operation depending on what rights were assigned in the share permissions. (Since all my shares are set to private, the user, nobody, can not even look at the share!) One thing to make sure is that the mask for file/directory creation is set to 666 and 777 for file and directory creation for non-superuser accounts. (I understand the default for many Linux distributions is 644 and 755 for these accounts.) Unfortunately, I do not use Linux on a regular basis so I have a limited knowledge (Perhaps, making me really dangerous!) about setting things up to work properly. Do you have Samba install in your Linux VM? It might be easier to get that to work. Quote Link to comment
Recommended Posts
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.