Upgraded to 6.10 and now new folders are created with wrong user group


Recommended Posts

Ever since I upgrade from 6.9.2 to 6.10 I have had constant issues when new folders get created in my seedbox share. I'm currently on 6.10.3-rc1 since I thought maybe there would be a fix in a newer version.

 

I have an lftp script that downloads files from my seedbox to /mnt/user/seedbox/completed/tv-sonarr the lftp script is run via the User Scripts plugin on a schedule and starts on array start.

 

every time it downloads something in a new folder, Sonarr/Radarr can not grab it and give this error.

[v3.0.8.1507] System.UnauthorizedAccessException: Access to the path '/downloads/completed/tv-sonarr/[neoHEVC+ DB] Kaguya-sama - Love is War [Season 1 + 2 + OVA] [BD 1080p x265 HEVC AAC] [Dual Audio]/Specials/Kaguya-sama - Love is War - S00E01 - (S2O1 OVA).mkv' is denied. ---> System.IO.IOException: Permission denied


Here are the permissions of my seedbox share.
image.png.45193876aba1157728c5fee34e056f73.png

 

Here are the permissions of stuff being download to the appropriate folder by my lftp script.
image.png.ca7799e8edcc48496e946b6872fd3bed.png

 

As you can see, they are getting set as root:root rather than nobody:users.

Here are the Sonarr/Radarr puid/guid's which I haven't touched

image.png.cb123194d0e73305522e1cf12c2dae6c.png

I can fix this termporarily by running "chown -R nobody:users" on the tv-sonarr directory and then Sonarr is completely happy. But that only solves the problem temporarily. The next time something new gets downloaded its the same problem all over again.

I've been searching and googling this forum for 2 weeks now trying to find a fix but I have not found anything. Is this a bug in 6.10 that does not yet have a fix? Can somebody please help me.

Link to comment
23 minutes ago, itimpi said:

Sounds like the script is running as root, so after downloading the files it needs to set the correct permissions on the files?  


Thats what I was thinking but its running via the Users Scripts plugin and as far as I know it didn't run as root on 6.9. How would I change the user that runs the script?

Link to comment
3 minutes ago, Shane Israel said:


Thats what I was thinking but its running via the Users Scripts plugin and as far as I know it didn't run as root on 6.9. How would I change the user that runs the script?

Perhaps there is a bug in 6.9.2 in that is does not correctly set permissions to the user running the script for locations under /mnt/user so it only worked by accident?  I'll have to do some checking to see.

Link to comment
1 minute ago, itimpi said:

Perhaps there is a bug in 6.9.2 in that is does not correctly set permissions to the user running the script for locations under /mnt/user so it only worked by accident?  I'll have to do some checking to see.


Thank you. If in fact it was pure luck that it was working correctly in 6.9 so be it. Its not like I can't add the chown command to the end of the script after each run haha. I guess that would work but it doesn't feel like a very elegant solution.

Link to comment
51 minutes ago, Shane Israel said:


Thank you. If in fact it was pure luck that it was working correctly in 6.9 so be it. Its not like I can't add the chown command to the end of the script after each run haha. I guess that would work but it doesn't feel like a very elegant solution.

Perhaps a simpler solution would be to use the 'su' command to run the download as the desired user - another thing I need to check out.

 

If this does turn out to be the case then maybe a request for an easy way in CA User scripts to specify the user the script should run as might be the best long term solution?

 

EDIT:  Just remembered that Unraid is not set up to allow the 'nobody' user to run a shell so maybe the chown/chgrp/chmod type solution will be required.

 

Link to comment
6 hours ago, itimpi said:

EDIT:  Just remembered that Unraid is not set up to allow the 'nobody' user to run a shell so maybe the chown/chgrp/chmod type solution will be required.

 


That is the case, I tried that and it would not work.

 

5 hours ago, Meannekes said:

i have the same issue but not with a script, for me this happens if i move/copy or create anything with Dynamix File Manager Plugin.

 

 

I'm assuming this was not an issue in 6.9 then?

Link to comment
  • 1 month later...

Did anyone ever find an elegant solution for this? I just went from 6.9.2 to 6.10.3 and now I'm having the same issue with Userscripts. Files/folders being created by a downloader script have root/root ownership instead of the prior nobody. Playing havoc with my auto-processing setup.

 

Thanks.

Link to comment
  • 8 months later...

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.