Kodi Community Forum

Full Version: Couch Potato permission problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello guys,

Installed Dharma on my asrock ION and i must say its awesome. Got the beautifull Aeon skin and enjoying my first movies thanks to many contributors on this forum. Thanks for that.

Now the problem Blush

When couch potato renames movies it failes changing permissions, when trying to create a folder on the external drive. After the downloads i set the sabnzbd permission to 777 but it didnt seem to help: couch potato is in a loophole now!

Can you help me to give couch potato the permissions?
Not sure if it is the same for you as was for me but when i installed cp manually i had this problem and just ditched it. A few months later i got a new server and installed via the script (thought i would give it a 2nd look) and it just worked.

Not the most helpfull responce i know but i must have made a mistake with the manual install maybe you did too?
I followed a tweaker tutorial next to comments on this forum. But I cant dismiss the possibility. Thanks, I'll keep it in mind in case I can't solve it. Is the script on the Ruud's CP page?

Anyone else got a tip? I'm guessing I got to give CP sudo rights or something in Ubuntu ...
I'm using arch Linux so some of my stuff may be slightly different. I fixed it by making sure that my network shares were mounted 777 and with my user name as the owner and 'pvr' as the group. You can pick any user name and group, just stay consistant. Next I chmod'd the entire sabnzb and couchpotato dirs to that same username and group. This was /opt/sabnzbd and /opt/couchpotatoon my system. Lastly I edited the start up scripts for both programs in /etc/RC.d so that they ran under my user name instead of their default.

It seemed like what was happening was the permissions are locked on the mounted shares (my shares are on a windows server 2k8 box). This made mv pass an error back to couchpotato (even though the move completed) because theres some extra info about the file that mv can't change. This makes couch assume that the move failed completely. Then it rescans your download directory, sees the movie again, tries to move it, and the cycle repeats. By making sure that the entire process from start to finish was only associated with one user/group namethat extra info never has to change, so mv never kicks back that error.
Thanks, that sounds about right. How can I mount my external drives 777? Can I do that in terminal?
You can, but off the top of my head I'm not sure what the exact command is. I have my shares listed in /etc/fstab. This is an example of how I've got mine set up.

Code:
//server/share  /media/mountdirectory   cifs   credentials=/root/.credfile,iocharset=utf8,uid=myuser,gid=pvr,file_mode=0777,dir_mode=0777 0 0

You can use whatever user/group you want for the uid and gid, just make sure that your also change ownership of the sabnzb and couchpotato directories to that same user/group, and that both programs are started as that user.

All of this might not be necessary, but it prevented anymore errors on my set up. If you care to know specifically what was causing the problem move a file to your share that has a different owner, the mv command should actually complete the move, but it kicks back a message about time information or something. It may be that error can be prevented in the first place with different fstab options, but I didn't really look into it once it started working right.