frank-unr Posted November 29, 2022 Share Posted November 29, 2022 I'm trying trying to fix permissions recursively to the standard unraid permissions at the end of a User Script but I can't figure out how. So far I have: chown -R nobody:users /mnt/user/backups-gdrive/ chmod -R u=rw,go=rw /mnt/user/backups-gdrive/ But I know that directories should also have +x. What would be the correct chmod command? 1 Quote Link to comment
Frank1940 Posted November 29, 2022 Share Posted November 29, 2022 Here is one example of how to do it: https://linuxize.com/post/chmod-recursive/ Be ever so careful when using the '-R' parameter. Improper paths can result in a disaster of the first magnitude!!! Use the find command first to verify which directories or files will be modified... Quote Link to comment
Solution BRiT Posted November 29, 2022 Solution Share Posted November 29, 2022 You're making it too complicated. Run newperms script with the parameter of the directory you want it to start in: /usr/local/sbin/newperms /mnt/user/backups-gdrive 1 Quote Link to comment
tjb_altf4 Posted November 29, 2022 Share Posted November 29, 2022 (edited) Unraid GUI > Tools > New Permissions is a once off tool to clean up perms, it also shows the reference permissions/ownership that are set. (New Permissions tool)...changes file and directory ownership to nobody/users (i.e., uid/gid to 99/100), and sets permissions as follows: For directories: drwxrwxrwx For read/write files: -rw-rw-rw- For readonly files: -r--r--r-- Edited November 29, 2022 by tjb_altf4 Quote Link to comment
frank-unr Posted November 29, 2022 Author Share Posted November 29, 2022 9 hours ago, BRiT said: You're making it too complicated. Run newperms script with the parameter of the directory you want it to start in: /usr/local/sbin/newperms /mnt/user/backups-gdrive Thanks! That should work. I didn't know about this newperms command. Quote Link to comment
BRiT Posted November 29, 2022 Share Posted November 29, 2022 55 minutes ago, frank-unr said: Thanks! That should work. I didn't know about this newperms command. There is also a Docker-Safe NewPerms command too, but I'm not sure where that's actually at and have only invoked it from the UI. I forget which CA-plugin provides it, if it's from the main "Community Applications" or one of the addons. As long as you don't run that newperms script against your "appdata" location or where you have dockers setup, you should be fine. 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.