1471 Posted June 4, 2021 Share Posted June 4, 2021 I've got a odd problem with file and folder permissions changing every few days. I Imagine this this is a container with the wrong permissions or something, however I've only been using Unraid for a few weeks and would appreciate pointing me in the right direction to find whats wrong. I have a fair few containers and a Server2019 VM, with shares mapped via a root share. This works well but every few days the permissions change and no longer have edit rights to the shared folder. This is the same when mapped to the share in my VM or connecting from ym Macbook. Running the tool 'docker safe perms' fixes the permissions but they keep reverting. I've run ls -al before and after fixing the permissions so can see whats being changed, see attached screen shot. I've also attached my servers diagnostics for info. If it's relevant, these are my root share settings: [root share] path = /mnt/user comment = browseable = no valid users = olly-share write list = olly-share vfs objects = #hide files veto files = /._ds*/.DS_Store/ hide files = /$*/ hide dot files = yes #unassigned_devices_start #Unassigned devices share includes include = /tmp/unassigned.devices/smb-settings.conf #unassigned_devices_end Any idea how I can find whats changing the permissions? I've had a look through the logs, but not really sure what i'm looking for. I've been through my containers and found a few that didn't have a PUID or PGID set, so i've added those variables to see if that makes a difference, but not entirely confident in what i'm doing when it comes to docker permissions to be honest. unraid-server-diagnostics-20210604-1123.zip Quote Link to comment
John_M Posted June 5, 2021 Share Posted June 5, 2021 What is a "root share"? Is it some unsupported way of circumventing unRAID's permissions system? If the path you're sharing is /mnt/user and not /mnt/user/<NameOfShare> then all your individual user shares are going to be accessible. Presumably that's the point of it but there are major caveats, such as the security of private and secure shares. Definitely not recommended. The safe and supported way to achieve the same thing would be to have just one user share and put all your files in subfolders of that. Quote Link to comment
trurl Posted June 5, 2021 Share Posted June 5, 2021 1 minute ago, John_M said: What is a "root share"? Quote Link to comment
trurl Posted June 5, 2021 Share Posted June 5, 2021 What application is downloading these files? Probably you need to look there for the settings to control permissions when these files get created. NZBGet and Transmission, for example, have umask setting to control the permissions of the created files. Quote Link to comment
1471 Posted June 7, 2021 Author Share Posted June 7, 2021 (edited) On 6/5/2021 at 2:46 AM, John_M said: What is a "root share"? Is it some unsupported way of circumventing unRAID's permissions system? If the path you're sharing is /mnt/user and not /mnt/user/<NameOfShare> then all your individual user shares are going to be accessible. Presumably that's the point of it but there are major caveats, such as the security of private and secure shares. Definitely not recommended. The safe and supported way to achieve the same thing would be to have just one user share and put all your files in subfolders of that. There are a few good use cases for root shares, Space Invader One has a recent video on it: Unraid & Moving Data (Part 4) RootShares And also covered in this older video with lots of other useful tips and tricks with SMB shares: Unraid Shares in Depth - PT1 Windows and SMB __________________________________________________________________________________ On 6/5/2021 at 2:50 AM, trurl said: What application is downloading these files? Probably you need to look there for the settings to control permissions when these files get created. NZBGet and Transmission, for example, have umask setting to control the permissions of the created files. Thanks for the reply. Yes that was my first though, however permissions for most other folders and files in the share are being changed too, so harder to track down as have lots of container mapped to the whole array. I can at least narrow it down to container that have access to the share though. There were a few containers without a PUID and PGID variable, so added those, but that didn't fix the problem. Think the next step is to look at umasks, I've ssh'd into each container and they've all running under 0022. Had some good advice in the unraid subreddit, sounds like changing umasks to 002 or 000 where supported might work? Not sure if the permission changes are something that would show up in the logs? If so, any idea what I should be looking for? Edited June 7, 2021 by 1471 Quote Link to comment
1471 Posted June 17, 2021 Author Share Posted June 17, 2021 Well, I haven't had any problems since so looks like adding a PUID and PGID to containers with those variables missing worked. Still not sure what container was causing the problem but all good now 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.