Random Permission Changes


Recommended Posts

So i've been using Unraid for a while now with minimal issues that have come up that couldn't be fixed.

 

I just updated to 6.7RC6 with no issues.

 

I've been using NZBget and Transmission for downloading media along side Sonaar with no issues up until today.

 

I downloaded a new series (Station 19) over NZBget today and something weird happened with the permissions making me unable to delete them or move them to a different share. As far as I can tell its permission related. I've tried the tools New Perms and the Docker Safe, not fixed.

 

I'm not savy enough to figure out how to change the perms manually to allow the system to edit the title, delete files, or move them. It seems to be at a User Share level but I cant confirm. Here is the output when I list them: (both the folder level and the files within the folder causing the issue

 

root@Zeus:~# ls -la "/mnt/user/Download/"
total 32
drwxrwxr-x 1 nobody users  2832 Mar 30 14:00 ./
drwxrwxrwx 1 nobody users    26 Mar 30 15:19 ../
-rwxrwxr-x 1 nobody users 14340 Mar 30 13:35 .DS_Store*        <----CANT DELETE THIS ONE EITHER AND WANT TO
drwxrwxr-x 1 nobody users     0 Dec 24 11:27 13\ Reasons\ Why/    <-----COMPLETELY FINE

drwxr-xr-x 1 nobody users    32 Mar 30 13:27 Station\ 19/     <-----------------------------------ISSUES THROUGHOUT (2 seasons within)

 

root@Zeus:~# ls -la "/mnt/user/Download/Station 19/Season 1"
total 14244788
drwxr-xr-x 1 nobody users        492 Mar 30 13:33 ./
drwxr-xr-x 1 nobody users         32 Mar 30 13:27 ../
-rwxr-xr-x 1 nobody users 1067075126 Mar 23  2018 01\ -\ Stuck.mkv*
-rw-rw-r-- 1 nobody users 1173701285 Mar 22  2018 02\ -\ Invisible\ to\ Me.mkv
-rwxrwxrwx 1 nobody users 1608867420 May 19  2018 03\ -\ Contain\ the\ Flame.mkv*
-rw-r--r-- 1 nobody users 1505993923 Mar 30 12:46 04\ -\ Reignited.mkv
-rw-r--r-- 1 nobody users 1281228287 Mar 30 12:52 05\ -\ Shock\ to\ the\ System.mkv
-rw-r--r-- 1 nobody users 1273811097 Mar 30 12:58 06\ -\ Stronger\ Together.mkv
-rwxr-xr-x 1 nobody users 1262525439 Apr 27  2018 07\ -\ Let\ It\ Burn.mkv*
-rw-r--r-- 1 nobody users 1328311142 Mar 30 13:11 08\ -\ Every\ Second\ Counts.mkv
-rw-r--r-- 1 nobody users 1146491895 Mar 30 13:16 09\ -\ Hot\ Box.mkv
-rwxr-xr-x 1 nobody users 1111705584 May 19  2018 10\ -\ Not\ Your\ Hero.mkv*
-rwxr-xr-x 1 nobody users 1826928842 Mar 29 10:12 s01e11\ dont\ know\ why.mkv*

 

root@Zeus:~# ls -la "/mnt/user/Download/Station 19/Season 2"
total 12453064
drwxr-xr-x 1 nobody users        788 Mar 30 13:59 ./
drwxr-xr-x 1 nobody users         32 Mar 30 13:27 ../
-rw-r--r-- 1 nobody users 1281436710 Mar 30 13:30 Station\ 19\ -\ 2x01\ -\ No\ Recovery.mkv
-rwxrwxrwx 1 nobody users 1355284821 Oct 12 04:11 Station\ 19\ -\ 2x02\ -\ Under\ The\ Surface\ (2).mkv*
-rwxr-xr-x 1 nobody users 1227354156 Oct 19 04:07 Station\ 19\ -\ 2x03\ -\ Home\ To\ Hold\ Onto.mkv*
-rw-r--r-- 1 nobody users 1378694500 Mar 30 13:39 Station\ 19\ -\ 2x04\ -\ Lost\ and\ Found.mkv
-rwxr-xr-x 1 nobody users 1138715708 Nov  2 03:11 Station\ 19\ -\ 2x05\ -\ Do\ a\ Little\ Harm.mkv*
-rw-r--r-- 1 nobody users 1066970011 Mar 30 13:45 Station\ 19\ -\ 2x06\ -\ Last\ Day\ on\ Earth.mkv
-rw-r--r-- 1 nobody users 1926910354 Mar 30 13:49 Station\ 19\ -\ 2x07\ -\ Weather\ the\ Storm.mkv
-rwxr-xr-x 1 nobody users 1346573356 Mar  8 04:12 Station\ 19\ -\ 2x08\ -\ Crash\ and\ Burn.mkv*
-rwxr-xr-x 1 nobody users 1005018106 Mar 15 03:11 Station\ 19\ -\ 2x09\ -\ I\ Fought\ The\ Law.mkv*
-rwxr-xr-x 1 nobody users 1024955299 Mar 22 03:11 Station\ 19\ -\ 2x10\ -\ Crazy\ Train.mkv*

 

 

As you can see the perms are all over the place.  Is there a command that I can run to change it on a full share level so that everything can be modified/deleted/moved?

 

Please help

 

PS: As far as I'm aware, everything should be like this (-rw-rw-rw- 1 nobody users 366982490 Jul 18  2014 01\ -\ Acceptance.avi). How do I force every file to be like this while folder levels like this (drwxrwxr-x 1 nobody users     0 Dec 24 11:27 13\ Reasons\ Why/). There are also some random files in other folders that are like this (-rw-r--r-- 1 root   root  586046642 Mar 30 12:20 09\ -\ Breast\ Cancer\ Show\ Ever.mkv)....I don't know why!

Edited by Brandon87
Link to comment

Correct me if I'm wrong, but I believe this is what I need to do;

 

1) sudo chmod -R 777 /mnt/user/Media/ (and do this for the other shares like /mnt/user/Download)

2) sudo chown -R nobody:users /mnt/user/Media/ (and do this for the other shares like /mnt/user/Download)

 

Would this fix all the issues?

Edited by Brandon87
Link to comment

Ok, but that doesn't solve the files/folder issue I have. That will fix the issue from getting worse.

 

Googled for nzbget and its under UMASK and have to make it 000 to get a permission level of 777. I also found the section to change the file and folder permissions in Sonaar - set both to 777.

 

How do I make everything in the share to 777 then? Follow my post above to change permissions then do the chown to make sure everything is under the proper nobody:users? Or is everything better to be put under root:root?

 

I've tried "sudo chmod -R 777 /mnt/user/Media/" and all I get is this type of error for all the files

 

"chmod: changing permissions of '/mnt/user/Media/Movies/The Mule.mp4': Read-only file system"

Edited by Brandon87
Link to comment

That suggests there is some sort of file system corruption that is the cause of the underlying problem as at would cause the disk to be mounted as read-only.    Have you tried running a file system check on the disk?

 

If you provide the system diagnostics zip file (obtained via Tools->Diagnostics) it should be possible to confirm whether this is your issue.

Link to comment
18 minutes ago, Brandon87 said:

I'm not sure if this will show it. I may have restarted since the start.  Currently rebuilding the disk to see if that corrects the issue.

 

I did run a BTRFS system check and there are lots off errors and issues. Repaired them as much as possible but it seems like theres a ton (which is why i'm trying to rebuild)

zeus-diagnostics-20190331-0529.zip

A rebuild does not correct file system errors - it just replicates them in the rebuilt disk.    Parity has no concept of file systems (it just understands physical sectors) which is why a rebuild does not fix such an issue.

Link to comment
27 minutes ago, Brandon87 said:

So does the diagnostics show a dead/dying drive? If so I will order a new one

I could not see anything in the diagnostics that suggested the disk itself (disk1) has a problem at the physical level although there is a high number of CRC errors (2601) which suggests there might be a cabling problem for that drive.  However since CRC errors never reset to zero it is not possible to know if they are recent.  The diagnostics do confirm that there is file system corruption on disk1.

 

29 minutes ago, Brandon87 said:

or is there a way to fix the file system? If I were to run a pre-clear would that correct the issues after reformatting? 

The disk in question is using both BTRFS and encryption neither of which I have any practical experience of so I am not in a good position to suggest the best way to recover from file system level corruption.    BTRFS is good at the initial detection of any such corruption but I do know that the BTRFS tools for file system repair are not as mature as other file systems in recovering from it once the damage occurs.    Someone else might be in a better position to suggest how you might recover the contents.

 

Reformatting the disk would almost certainly fix the problem but would result in the disk contents being lost so do you have backups you could recover from?  If not then it might be necessary to first get off the disk whatever data is readable before attempting any recovery action?  Note that if going such a route then pre-clear is not really necessary except to act as a confidence check of the drive.

Link to comment
16 hours ago, Brandon87 said:

If I were to just pull disk 1, format it, and restore the files onto disk 1 from the snapshot, would that fix the issue?

Yes, if the snapshots are good.

 

16 hours ago, Brandon87 said:

I’ve never had to restore files from a snapshot yet though so not entirely sure of the process

You can just do a regular copy or use btrfs send/receive.

Link to comment

I've tried everything to get stuff off disk 1 but i keep getting Input/output error with some files. I can't even copy certain ones out of my Snapshots because it appears they are corrupt as well.

 

Suggestions?

 

I purchased a new disk to replace it - suggestions?

Edited by Brandon87
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.