Kodi Community Forum

Full Version: [LIVE]Couchpotato renamer permissions issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi folks,

Hoping someone out there can help me! I am having real trouble getting the couchpotato renamer function to work on live. I have mount point set on my NAS which is mounted via /etc/fstab and mounts to /mnt/video2.

When I set couchpotato to use this as the destination I get the following permissions error

Code:
20:45:43 ERROR [     app.lib.cron.renamer] Failed changing permissions /mnt/video2/Wimbledon (2004)

It does in fact execute the file copy but does not clear up the original directory, leaving me with a directory such as

_EXISTS_MOVIENAME

Now, I have been through every single directory, mount point and file on the path between the live box and the NAS and set them to be the same user and group and chmod 777 everything. All of the couchpotato files are the same. The daemon is running as the same user.

Has anyone come across this problem and been able to resolve it? My HTPC is a Revo with a tiny HDD in it. I only want the downloaded file to live on there for as long as it takes to complete it then I want it on my NAS.

Full couchpotato log of the error is here

http://pastebin.com/yvkQZGtZ

I had this working perfectly on a windows box, very frustrating!
Solved..kinda.

This problem seems to manifest itself when filesystem is mounted as smbfs. This was the only filesystem I could get my NAS shares to mount using (D-Link DNS323).

The problem then happens with python scripts that use the functions shutil.copystat, shutil.copymode or os.chmod (or other functions which call these, eg shutil.copy2)

I got around this by just hashing out the relevant sections in renamer.py and shutil.y which call these functions and now its working. Elegant? no. Working? yes

Had to do the same with headphones in postprocessor.py where there is a section which attempts to chmod the newly created files in the destination directory. Again hashing out this section fixed the file copy issues.

Anyway I hope this proves to be of use to someone in the future when researching this problem, coz I had to learn more about python than I ever wanted to to work out what was going wrong!

Will teach me to buy a NAS with a proper filesystem in the future too :p