So i have sonarr running as user nzbdrone. I have all my media on /home/pi/sambashare which is a sambashare on the network. The problem i have is that user nzbdrone can create the folders and files just fine, but it can’t delete or rename files or folders. So sometimes when i get a better quality episode coming along, it can’t delete the file in the current location and replace it.
i tried to add nzbdrone to the sudo group, but still no luck. I can’t chown or chmod as user nzbdrone any files in the /home/pi folder without sudo.
anyway to get around tihs?
Can you add the nzbdrone user to the group that owns those files? or run Sonarr as the user that owns those files?
Adding nzbdrone to sudoers isn’t going to help, since it won’t ask for extra privileges; the only way that would be successful is if it was allowed to sudo without a password, which could be as bad as running as root.
sorry, i’m bad at linux so you’ll have to bear with me.
the directories are owned by pi:pi right now, so i tried to add user nzbdrone to pi, testing with both supplementary and primary groups and same thing. when logged in as nzbdrone i can create a directory but can’t delete it… what’s weird is when i mkdir as user nzbdrone, the new directory is still pi:pi.
i guess i will have to run as user pi if there’s not another alternative.
What are the permission on the files/folders? Does the group actually have the rights to delete files (write access) or it is only the user? Its possible that permissions have been set on a ancestor folder that enforce ownership and permissions, causing issues - not sure how to verify or alter this but the easiest course of action would be to change the user it runs under.
The permissions on the folder is: drwxrwxrwt
Actually i’m pretty sure it’s that sticky bit, but like I said i’m bad at linux so…
Whenever the rpi boots up, it mounts the directory as a CIF format with UID and GID which is for user:pi group: pi. So all the directories are pi:pi, even though nzbdrone might have been the one to create the folder initially. So from what i can google, the sticky bit only allows the owner (which would have to be user pi) to delete that folder. If i chmod 777 the folder and set permissions to drwxrwxrwx, then i can delete the folders as user nzbdrone.
can i somehow get nzbdrone to set the permission on the folder without the sticky bit when it creates it?
seems to work if i run as root also… but not sure if that’s frowned upon or not.