Jump to content

Basic Linux permission question


horstepipe

Recommended Posts

horstepipe

Hey folks 

I‘m running Debian, switched from Ubuntu.

I can’t remember how I solved that problem once on Ubuntu:

I‘m having a python script creating strm files and media folders ran by my primary user via cron (I‘m running an sh script via cron which starts the actual python script as I had some other issues with starting the python script vis cron directly ).

I need emby to delete the strm files (with customscripterx plugin), so basically emby (the user) needs full access to theses files and folders.

How can I accomplish that?

Link to comment
Share on other sites

Q-Droid

Did the permissions script run without errors and did you verify the permissions after you ran it? If it's the one I think then it should have given you what you need.

  • Thanks 1
Link to comment
Share on other sites

horstepipe

Hm I will check that again but I am quite sure it ran without issues. 
 

Link to comment
Share on other sites

Q-Droid

Yeah, that's the one. The next step would be to check your paths to verify the permissions and ACLs after running the script.

Another thing that isn't quite self-explanatory about the script is that the MEDIA_DIRECTORY value should be more or less a base directory under which the media resides. Depending on how your files are organized it could be a single path or multiples so also a single or multiple script runs.

That said I think I see where the script might not give you everything you need. I would have to test a little to confirm this.

 

  • Thanks 1
Link to comment
Share on other sites

Q-Droid

Ran some tests and the script is good as long as the right argument values are used.

So the question is what are the ownership and permissions for the files and folders created by your (strm) script? Need to know if the current state is for files and directories created before or after running the dcrdev script.

 

Edited by Q-Droid
  • Thanks 1
Link to comment
Share on other sites

  • 4 weeks later...
tedfroop21
On 15/02/2024 at 09:32, Q-Droid said:

So the question is what are the ownership and permissions for the files and folders created by your (strm) script?

Wouldn't that be based on the user running the script?   (asking for my understanding) 

Link to comment
Share on other sites

kikinjo

@horstepipe

Just run this 3 commands for every folder with media :

sudo setfacl -m u:emby:rwx /home/movies/
sudo setfacl -R -m u:emby:rwx /home/movies/
sudo setfacl -R -d -m u:emby:rwx /home/movies/

 

repeat for every other media folder u got, and you will be fine

 

Link to comment
Share on other sites

Q-Droid
1 hour ago, tedfroop21 said:

Wouldn't that be based on the user running the script?   (asking for my understanding) 

Indeed. The user running the script owns the files. And if that user isn't emby then access might be restricted unless other measures were taken to make sure emby does have access, like the permissions script or ACLs. 

  • Thanks 1
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...