I’m a noob and would like some help to figure out what the issue i’m having with my NAS and couchpotato. I’m using OSMC on raspberry pi3, transmission installed & Sickrage. When i download a tv show after post processing it renames the file and put it in the tv shows completed folder. When couchpotato does the same process it tries to rename file after download but it deletes the file after it moves it. I notice i have some error logs for couchpotato which seems to be write permissions which is restricting couchpotato to complete it’s task. I have copied the the code, can someone help me with this issue?
05-16 20:01:38 ERROR [hpotato.core.plugins.base] Unable to write file “/home/osmc/wdmycloud/Downloads/Vol 1 Movie/Temp DL/War.on.Everyone.2016.720p.BluRay.X264-AMIABLE[rarbg]/war.on.everyone.2016.720p.bluray.x264-amiable.downloading.ignore”: Traceback (most recent call last):
File “/opt/CouchPotatoServer/couchpotato/core/plugins/base.py”, line 108, in createFile
f = open(path, write_type)
IOError: [Errno 13] Permission denied: '/home/osmc/wdmycloud/Downloads/Vol 1 Movie/
please edit your question to show the output of ls -l '/home/osmc/wdmycloud/Downloads/Vol 1 Movie/' (assuming you have ssh access).
Also note you can make more legible posting by using the tools in the edit toolbar at the top of the msg edit box. the </> icon on selected text makes for easier reading of technical code/error messages/etc.
The MyCloud. It is really a hyper minimal linux inside. nnnn_mmm wants to be sure that your permissions are suitable, and to see what user/group the Pi is using, and what user/group CouchPotato is trying to work under, as well as what the “others” permissions are in the folder in question.
Im a noob, still trying my hand at this thing but i have copied the path see below;
/home/osmc/wdmycloud/Downloads/Vol 1 Movie/Temp DL" after the download completes I literally watch the files vanish from the completed folder attempting to move it to “/home/osmc/wdmycloud/Movies” but it gets deleted during this process.
I made a very detailed post about Unix-like filesystem permissions some time ago…
Basically, it is possible that the group used by one application has access rights that the group for CouchPotato does not have, and this is why one application works, and CP fails. We can help diagnose that by seeing the ls -ll output of the folders in question.
I tried and even after it says successful when i go back on folder to check permission it reverts. I can now SSH into my cloud i set it up. I also noticed my external HDD that i use to use for storage for movies when couchpotato post process then move to completed folder, the permission on the folders on the external HDD is saying 777.
Sigh, I changed permissions to folder but the result remains the same see below error;
05-17 07:25:14 ERROR [tato.core.plugins.renamer] Failed renaming the file “xXx.Return.of.Xander.Cage.2017.1080p.BluRay.H264.AAC-RARBG.sub” : Traceback (most recent call last):
File “/opt/CouchPotatoServer/couchpotato/core/plugins/renamer.py”, line 641, in scan
self.moveFile(src, dst, use_default = not is_torrent or self.fileIsAdded(src, group))
File “/opt/CouchPotatoServer/couchpotato/core/plugins/renamer.py”, line 868, in moveFile
File “/usr/lib/python2.7/shutil.py”, line 119, in copy
File “/usr/lib/python2.7/shutil.py”, line 83, in copyfile
with open(dst, ‘wb’) as fdst:
IOError: [Errno 13] Permission denied: ‘/home/osmc/wdmycloud/Movies/xXx Return of Xander Cage.sub’
I’m sure I cant be the only person with a WD my cloud having this write issue. The weird thing is Sickrage works fine no issues, but after Couchpotato completes a download and the post processing starts you see the file moved from the downloads folder or appears to have been moved, then it just completely deletes all traces of the file this is quiet frustrating.
When I had the external HDD connected couchpotato write and moved files with no issue, my friend has a Synology NAS and has absolutely no issue I think I will sell my WD storage and invest in a Synology NAS as this is too much of a headache nor can I find a solution to this problem on the web.
Hmm… What is the directory structure on the MyCloud? I cant give an exact command to issue without it. The previous assumed that your movies were stored on the MyCloud in the /shares/Downloads folder, as seen by the mycloud internally. I need to know where the mycloud is storing your movies.
I think i found a new angle to this thing. Let me tell you what I was doing before and what I think I need to be doing and may require some guidance.
I created folders on the NAS by going directly to the NAS folders from windows explorer and created folders. Result: I noticed that when I SSH into NAS and check folder permissions it didn’t have permissions set to 777 which offers full permissions.
I mounted the NAS in raspberry Pi via mkdir wdmycloud
Then I ran sudo nano /etc/fstab
Then this was the path I added… //192.168.11.14/afcloud /home/osmc/wdmycloud cifs username=afcloud,password=boss1,noauto,x-systemd.automount,uid=1000,gid=1000,iocharset=utf8 0 0
I decided today I would SSH into the NAS and create the folders within the SSH, after i created the folders and checked the permissions it said 777! Full permissions to all folders created within SSH.
It points to maybe something i’m doing incorrectly with how i’m adding folders etc etc. I was doing some reading online and noticed some persons path added when the fstab in their raspberry Pi they had a path that looks something like this… 192.168.1.100:/nfs/nameofshare* /mnt/nameofshare* nfs username=administrator,password=pass atime,auto,rw,dev,exec,suid 0 0
I then noticed they had the permissions set for auto,rw,dev,exec,suid 0 0 none of which was in my path mounted. Right now i’m clutching at straws but some how i feel i’m on the right path now. Let me know what is the correct way to mount my NAS correctly to the Pi.
Since you are using an rPi, I would suggest using NFS instead of SMB/CIFS, as you will get native FS permissions, instead of double-translated ones. (Samba translates the unix permissions inside the wdmycloud, to windows-like ACLs for user, group, and everyone objects— which then get translated BACK again when you mount the volume with cifs on the rPi.)
To use NFS, you might (if your device is using 2.xx.xx.xx firmware) need to turn it on in the dashboard. Since NFS uses native unix permissions, normal tools to change permissions will “just work” on the files and folders accessed over it.
Ok so I will enable the NFS on the NAS then and yes i’m running the latest version firmware. After I enable i should change my mount point to something looking like //192.168.11.80/nfs/afcloud /home/osmc/wdmycloud cifs username=afcloud,password=boss1,noauto,x-systemd.automount,uid=1000,gid=1000,iocharset=utf8 0 0