-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error HttpServer: Error processing request; Access to path denied #2
Comments
@clara-j you were right. It is a permissions issue. It was deleting the metadata successfully. But not the media. I will have to play around with ACLs to get this working the way I want it to. |
@clara-j Question for you: Are the files deleted by the "admin user" or the "track with user"? |
The delete command is sent using the API of the Admin user you provided. But to be able to delete the actual files on the filesystem, the linux user that the emby server is running under must have permissions on the folder to delete the files. You can check what user the emby server is running with the ps command, but if the metadata has user/group emby:emby then it is likely emby. So you will need to make sure that the emby user has delete permissions for that folder. You can either modify the folder so that any users can delete, or add emby to the group and make sure the group is able to delete. I had a similar, if not the same issue, when I first starting developing this since I was using docker and the media folder I mapped with the RO option and deleting from the filesystem failed due to that. When I updated dockers-compose to no longer mount as RO it worked.. |
For anyone else who may run into this issue; as @clara-j mentions you will need to add emby to the group that has permissions to delete your media and then make the group permission for that folder rwx. BUT... this will also give any other users in your group rwx permissions allowing them to delete media. Another option is to specifically give the user emby rwx using an Access Control List. You only need to do one of the following:Easy less secure way
#change the permissions of your media folder so anyone in your group can delete media
Still easy once you learn setfacl and getfacl, but also more secure #setup an access control list giving the user emby permission to delete existing media files
#setup a defualt access contol list giving the user emby permission to delete future media files that will be added
|
Thanks for the great explanation. Any issue with me adding this to the README for other users that may have the same problem? |
No issues with that at all. |
All embys/jellyfins may not report the same media item data back. Update to handle missing data items from emby/jellyfin used to build detailed output. Now if any of the extra data used to build detailed output is missing; fall back to the basic data needed to delete the episode and continue on to the next media item. Handle KeyError Exception Gracefully. Add server branding option, choose emby or jellyfin. Add base url for jellyfin so API calls work when base url is changed. Update get_days_since_last_watched() to work with emby and jellyfin. Text clean-up.
Here is the new issue I am opening as requested.
I am not sure if you are talking linux rwx permissions or the "User-->Profile-->Allow Media Deletion From-->All Libraries" setting on the emby server?
Either way, I have tried running the script from my server as the user I am logged in as and as root. Both have rwx permissions to my media files/folders.
When running the script for the first time to set up the config file, I input my username/password for the emby admin account. I then select a different account as the user to track with. Both accounts have their "User-->Profile-->Allow Media Deletion From-->All Libraries" setting checked.
I see the same issue.
https://pastebin.com/raw/nsFvPw35
The text was updated successfully, but these errors were encountered: