Random files inaccessible. "You do not have permission to access...."


Recommended Posts

I have a large share for my Plex media. Recently I noticed that Plex could not find some tv shows that I know are on my share. I navigated to that folder from inside a Windows vm and got this message:

image.png.d70225fe2efc234088f3d12be723efd8.png

 

But I (and Plex) can access other folders just fine. Since Plex is running as a docker on Unraid, and does not need a VM, I think that the problem is with Unraid and not the VM. 

 

I tried rebooting Unraid but that did not help. I also can't delete the folders and just create them again. The share itself is not protected with a password so everybody should be able to access it. (planning to do that in the near future)

image.thumb.png.966b1232e96601f2a774b18586fca39d.png

 

I have attached the diagnostic files. 

tower-diagnostics-20211120-1335.zip

Edited by workermaster
Link to comment
41 minutes ago, trurl said:

What do you get from the command line with this?

ls -lah /mnt/user/Plex/Series/The\ Spy

 

Hi, thanks for your reply. The issue has just been solved. I also posted this question on Reddit. Running the Docker new params feature in the "Tools" section did solve it. When I run the command you post now, I get this:

image.png.8ab241a06aeb6fb7f761603a5d461fb5.png

 

I do not know if that is how it is supposed to be, but it all does seem to be working now. 

Link to comment
  • 2 months later...
On 11/20/2021 at 2:41 PM, trurl said:

What do you get from the command line with this?

ls -lah /mnt/user/Plex/Series/The\ Spy

 

Hi, 

 

Sorry to revive an old topic, but the problem has returned a few times and now seems to be here for good. 

I had to click on the Docker new params option a couple of times in the last few months since a few (different ones each time) files kept becomming inaccesible. Usually this fixed it for me, but now I have a few files that I can't seem to delete. 

 

I need to delete an old backup folder. I can rename the folder but not delete it in Windows or the Krusader container. Windows tells me that I need permission and the Krusader container seems to do nothing. 

 

Here is what I get when running your command:

image.png.e0754da3749593c7ab3574dae8112bc9.png

 

Could you please help me figure out why this folder is not removable?

Link to comment

It looks like the path down to the directory that you are trying to delete does not have any permissions problem.  So the problem must be in the directory itself.  

 

Linux will not delete a directory that is not empty.  So whatever process you are using to delete the directory must first empty/delete the contents of the directory.  Once that directory is empty, then the directory can be deleted.  I would now suspect that the permissions/owner/group properties of some files (or directory) inside your directory (Rudd backup) are not allowing the contents to be deleted so that the directory itself can be deleted. 

 

So start by drilling down through this directory and look for any files/directories whose owner/group are not nobody/users and for permissions on files that are not -rw-rw-rw-  (-rwxrwxrwx is permissible also) and directories whose permissions are not drwxrwxrwx.

 

There is a Linux command that can be run from the command line in a recursive mode that will remove this directory and all of its contents BUT it is every dangerous to run as a small mistake in the path parameter in the command line can do a great deal of damage as the command runs without questioning the user or providing any feedback as it works.

Edited by Frank1940
Link to comment
On 1/21/2022 at 11:59 PM, Frank1940 said:

It looks like the path down to the directory that you are trying to delete does not have any permissions problem.  So the problem must be in the directory itself.  

 

Linux will not delete a directory that is not empty.  So whatever process you are using to delete the directory must first empty/delete the contents of the directory.  Once that directory is empty, then the directory can be deleted.  I would now suspect that the permissions/owner/group properties of some files (or directory) inside your directory (Rudd backup) are not allowing the contents to be deleted so that the directory itself can be deleted. 

 

So start by drilling down through this directory and look for any files/directories whose owner/group are not nobody/users and for permissions on files that are not -rw-rw-rw-  (-rwxrwxrwx is permissible also) and directories whose permissions are not drwxrwxrwx.

 

There is a Linux command that can be run from the command line in a recursive mode that will remove this directory and all of its contents BUT it is every dangerous to run as a small mistake in the path parameter in the command line can do a great deal of damage as the command runs without questioning the user or providing any feedback as it works.

I have looked at a few directories in there. Here is what I found when running the comman again, but deep inside the folder:

image.png.001d3dd15858d823d3da578c40484ecb.png

 

I can delete the folders called "Dropbox.cache" and "Schermafdrukken" in Windows but they come back after a few moments. I can't delete them using the Krusader Docker, so I think this is just Windows being weird. 

 

I am seeing some weird permissions, but the folders and files that have the correct permissions (and are part of either the Nobody or Users group) still can't be deleted. 

What would the next step be?

 

I could copy over all the relevant data and format the drive, but that does not seems like the correct solution. 

Link to comment

You must have some idea about what is generating these files and file structure.  If I look up the directory tree, I see that it is apparently "Backups" type of file structure.  I would be looking for some program that does automatic backup or file syncing. I also see that the next directory down from "Backups" is "Syncthing"...

Edited by Frank1940
Link to comment
14 hours ago, Frank1940 said:

You must have some idea about what is generating these files and file structure.  If I look up the directory tree, I see that it is apparently "Backups" type of file structure.  I would be looking for some program that does automatic backup or file syncing. I also see that the next directory down from "Backups" is "Syncthing"...

This is an old directory. I changed the backup location in Syncthing and can see that it uses the new directory (it is backing up data there now). The old one is not in use by anything anymore. I have also tried to stop all my Docker containers, and I still can't delete them. 

 

When I run a plugin that shows file activity, then it does not show anything when I try to delete those files. 

Link to comment

UPDATE: I got rid of the files. Turns out that Windows couldn't change anything about the files, but with the Krusader container, I could change the group owner. It was set to USERS and then I changed it to NOBODY. Then I could delete the files. Maybe Unraid and Windows were reporting an owner that was not the owner? I don't fully understand it, but the files and folders are now gone. 

  • Like 1
Link to comment
3 hours ago, workermaster said:

Turns out that Windows couldn't change anything about the files, but with the Krusader container, I could change the group owner. It was set to USERS and then I changed it to NOBODY.

 

In the default Unraid  permissions setup, the "Owner" (of the asset)  is 'nobody' and the "Group" (a collection of 'login-users' who the 'owner' is granting defined access to that asset)  is 'users'.   Basically, the is no such thing as "group owner".   (By the way, I am lead to believe this 'owner' and 'group' are defined as special cases for the Linux OS.  Google  'linux nobody user'    and    'linux users group'   for more information.  I know this whole thing is really confusing unless you are Linux Guru-- and I am NOT one of those!  I know just enough to make me really dangerous!!!)

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.