-
spaceMonkey started following Accidently ran newperms on /mnt
-
Accidently ran newperms on /mnt
Hello, I made a major mistake today when tinkering on my server. I was working on a setting up a new container (backrest) and while testing the restore process the directories created were inaccessible via SMB. After looking at permissions I could see that the directories were created for the root user. Below is the permissions for the problem directory using "ls -alh" from a directory a few levels deeper. drwx------ 1 root root 29 Jul 3 19:43 ../ I've had permissions issues before but usually run newperms with an explicit usershare in the CLI like: newperms /mnt/user/share This time though I ran just newperms from the context of the directory, expecting it to behave like above, and watched in horror as it marched through all my discs including the cache 😭 root@PATHS:/mnt/user/Temp/backrest_test# newperms Processing: /mnt/disk1 ... chmod -R u-x,go-rwx,go+u,ugo+X /mnt/disk1 ... chown -R nobody:users /mnt/disk1 ... sync Processing: /mnt/disk2 ... chmod -R u-x,go-rwx,go+u,ugo+X /mnt/disk2 ... chown -R nobody:users /mnt/disk2 ... sync Processing: /mnt/disk3 ... chmod -R u-x,go-rwx,go+u,ugo+X /mnt/disk3 ... chown -R nobody:users /mnt/disk3 ... sync Processing: /mnt/disk4 ... chmod -R u-x,go-rwx,go+u,ugo+X /mnt/disk4 ... chown -R nobody:users /mnt/disk4 ... sync Processing: /mnt/disk5 ... chmod -R u-x,go-rwx,go+u,ugo+X /mnt/disk5 ... chown -R nobody:users /mnt/disk5 ... sync Processing: /mnt/disk6 ... chmod -R u-x,go-rwx,go+u,ugo+X /mnt/disk6 ... chown -R nobody:users /mnt/disk6 ... sync Processing: /mnt/cache ... chmod -R u-x,go-rwx,go+u,ugo+X /mnt/cache ... chown -R nobody:users /mnt/cache ... sync Completed, elapsed time: 00:03:19 I found this topic (https://forums.unraid.net/topic/177037-completely-screwed-up-ran-new-permissions-on-every-share-including-appdata-now-no-containers-work-with-execution-error-bad-parameter-message/) where someone had something similar happen, although my containers still seem to be working. I went through the following steps: I stopped the docker service. Opened the web terminal and ran: root@PATHS:/mnt/user/Temp/backrest_test# newperms /mnt/user/appdata Processing: /mnt/user/appdata ... chmod -R u-x,go-rwx,go+u,ugo+X /mnt/user/appdata ... chown -R nobody:users /mnt/user/appdata ... sync Completed, elapsed time: 00:01:55 root@PATHS:/mnt/user/Temp/backrest_test# chmod -R 777 /mnt/user/appdataStarted the docker service. As mentioned my docker containers seem ok but I'll be checking logs and re-installing if I need too. I've been moving to docker compose and had shutoff CA Appdata Backup recently as I was making my transition. Ironically testing a new container for backups is what makes me wish I had a better / more recent backups for my appdata.😆 None of my containers hold any critical data, it'll just be annoying if I need to redo everything from scratch. Critical data is safely backed up with rclone. What I'm not sure on is what else is effected on the cache? Other than docker compose I have a standard 6.X setup. Everything for docker (including compose stacks) in appdata on a cache drive. The docker.img file is also it its standard location, system on the cache drive. I have some linux VM's but I rarely use them and would be ok with losing them. Is there anything else I should be worried about / check on? Thanks in advance for reading and hopefully this prevents someone from making the same mistake!
spaceMonkey
Members
-
Joined
-
Last visited