Jump to content

Question about folder permissions for deleting


JimB66

Recommended Posts

Hi There,

This is a new issue, as I was able to delete videos previously from within the Roku app.

These are in a library I call "Temp Video" and it's "mixed content". The main change was that I replaced the very old 250GB HDD that Emby runs on (unRAID docker on an "Unassigned Device", i.e. outside the array) with a newer 1TB drive. Using "rsync" within unRAID worked great, kept everything as it was. Just for some reason I can't delete videos within the app any longer.

I have been dealing with some streaming/buffering issues, so in the course of that I may have switched off a setting related to deleting, but I can't figure it out and searching the forum didn't turn up anything related. The "trashcan" icon is there in the app, just as it was before, it just doesn't seem to do anything. The video remains in the library, even overnight (allowing for some kind of delayed trash removal).

If you could point me in the right direction, I'd appreciate it. Let me know if any of the logs are useful and I can supply them. But it seems like it's something simple that I'm just overlooking.

Thanks,

Jim

Edit: the "Allow Media Deletion" seems to be set correctly (I'm the only User):

image.png.73c0931e8b3efaac7fdfd4882e61542e.png

Link to comment
Share on other sites

Happy2Play

If I remember correctly there is a option within the app also, have you checked the setting in Emby for Roku client? @JimB66

Link to comment
Share on other sites

13 minutes ago, Happy2Play said:

If I remember correctly there is a option within the app also, have you checked the setting in Emby for Roku client? @JimB66

Thanks for the reply. I looked through all of the settings in the Emby Roku client and didn't see anything.

Link to comment
Share on other sites

2 hours ago, ebr said:

Hi.  When you click on the delete button you don't even get the confirmation dialog?

Sorry, yes I get the confirmation dialog. I select "Yes" and it returns to the content but the video that I "deleted" is still there. I can play it, etc.

Edited by JimB66
Link to comment
Share on other sites

10 minutes ago, JimB66 said:

Sorry, yes I get the confirmation dialog. I select "Yes" and it returns to the content but the video that I "deleted" is still there. I can play it, etc.

Okay, then this is most likely a file system permission issue.  Can we please see a server log from when you attempted this?

Link to comment
Share on other sites

5 hours ago, ebr said:

Okay, then this is most likely a file system permission issue.  Can we please see a server log from when you attempted this?

Strange, I would have thought all of that would have been preserved with "rsync". FWIW, I do see that there are different permissions for different files (I've never had cause to look at them before, so not sure what I was expecting).

I'll run a test or two later this afternoon with files with different permissions and post the log.

Thanks!

Link to comment
Share on other sites

1 hour ago, JimB66 said:

Strange, I would have thought all of that would have been preserved with "rsync". FWIW, I do see that there are different permissions for different files (I've never had cause to look at them before, so not sure what I was expecting).

I'll run a test or two later this afternoon with files with different permissions and post the log.

Thanks!

OK, here are the details of two files that I saw that had slightly different file permissions (they represent the two differences I saw):

-rw-rw-rw- 1 nobody users  224953452 Jun 19  2019 Vanguard\ 1\ -\ Unlocking\ investment\ success\ Why\ YOU\ are\ the\ power\ behind\ your\ portfolio.mp4

-rw-r--r-- 1 nobody users 1078996990 Sep  9 11:51 DTM.2021.Round05.Red.Bull.Ring.Quali2.Web-DL.1080p.x264.English.mkv

Tried to delete each of them. As mentioned, got the confirmation dialog, selected "Yes", but they were not deleted.

I see "permission denied" messages in the server log for those two actions, now I need help on fixing it. Here's the log:

Thanks!

embyserver.txt

Edit: There's only one Emby User, me ("Jim").

Edited by JimB66
Link to comment
Share on other sites

55 minutes ago, JimB66 said:

OK, here are the details of two files that I saw that had slightly different file permissions (they represent the two differences I saw):

-rw-rw-rw- 1 nobody users  224953452 Jun 19  2019 Vanguard\ 1\ -\ Unlocking\ investment\ success\ Why\ YOU\ are\ the\ power\ behind\ your\ portfolio.mp4

-rw-r--r-- 1 nobody users 1078996990 Sep  9 11:51 DTM.2021.Round05.Red.Bull.Ring.Quali2.Web-DL.1080p.x264.English.mkv

Tried to delete each of them. As mentioned, got the confirmation dialog, selected "Yes", but they were not deleted.

I see "permission denied" messages in the server log for those two actions, now I need help on fixing it. Here's the log:

Thanks!

embyserver.txt 92.23 kB · 1 download

Edit: There's only one Emby User, me ("Jim").

Have you taken a look at this?

 

Link to comment
Share on other sites

Yep it is the permissions.

	System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path '/tempvideo/DTM.2021.Round05.Red.Bull.Ring.Quali2.Web-DL.1080p.x264.English.mkv' is denied.

Please let us know if you still have issues after following the above guide.

Link to comment
Share on other sites

3 hours ago, ebr said:

Yep it is the permissions.


	System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path '/tempvideo/DTM.2021.Round05.Red.Bull.Ring.Quali2.Web-DL.1080p.x264.English.mkv' is denied.

Please let us know if you still have issues after following the above guide.

I figured it was a permission issue.

BTW, from that thread that Luke posted, I assume the "setfacl" command is what I need to run? While I'm familiar with Linux permissions in terms of reading the "ls -l" output, the specific command to run to change ownership to "emby" is the question I have.

Link to comment
Share on other sites

49 minutes ago, JimB66 said:

I figured it was a permission issue.

BTW, from that thread that Luke posted, I assume the "setfacl" command is what I need to run? While I'm familiar with Linux permissions in terms of reading the "ls -l" output, the specific command to run to change ownership to "emby" is the question I have.

OK, so I tried this command:

setfacl -m user:emby:rxw /mnt/disks/appdisk/TempVideo (copied from the "Solution" post, with my folder)

and I get the following error:

setfacl: Option -m: Invalid argument near character 6

This was mentioned by someone in that guide thread as well, with no answer or help.

Your help on this is appreciated. I don't recall having to do any of this during the original install of Emby, and I was under the impression that using "rsync" to move everything from the old HDD to the new HDD would have kept all the permissions, file attributes, etc. But I guess not completely ("Continue watching" videos were OK, as was everything else I could see through the app). So hopefully with your help I can remedy the existing situation, otherwise I can see only deleting and re-installing Emby as a next step since I presume on a fresh clean install Emby will set the file and folder permissions correctly from the outset.

Thanks.

Edit: I mentioned in my original post, but I'll mention again, Emby is running as a docker on my unRAID NAS, on an "Unassigned Device" which is outside the array. Been running fine on the original HDD for close to a decade. All I tried to do was replace the old HDD. Don't know if that adds any complexity or changes the approach to a solution. Thanks again.

Edited by JimB66
Link to comment
Share on other sites

(Sorry for the additional post - for some reason I can't edit my posts at the moment.)

Related to the "Invalid argument" message above, emby doesn't appear to be a user:

root@SleeperService:~# id emby
id: ‘emby’: no such user

So, now what?

Link to comment
Share on other sites

18 hours ago, JimB66 said:

(Sorry for the additional post - for some reason I can't edit my posts at the moment.)

Related to the "Invalid argument" message above, emby doesn't appear to be a user:

root@SleeperService:~# id emby
id: ‘emby’: no such user

So, now what?

Please start a new thread in the Linux section regarding the permission issues.  That will get this in front of the proper eyes.

Thanks.

Link to comment
Share on other sites

FYI, just to close the loop, @Q-Droid provided the help I needed and I can now (once again) delete existing and new video files.

I needed to find out who the actual user of Emby was, by looking at who owned the logs. In my case this was "daemon".

Then back to the Linux Permissions thread and @Q-Droid post for the proper recursive commands:

Quote

Recursively add an ACL to give access to existing files and directories.

setfacl -R -m user:emby:rwX <path to media base dir>

Recursively add a default ACL rule that will automatically give access to new files and directories.

setfacl -R -m d:user:emby:rwX <path to media base dir>

I still want to look closer at "rsync" and see why I missed getting the owner/permissions transferred correctly.

Regardless, things seem to be working as they were before. Thanks to all that helped!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...