It is currently Tue Oct 23, 2018 1:12 pm
All times are UTC + 8 hours

CP creates read-only folders

CouchPotato is an automatic NZB and torrent downloader.
You can keep a "want to watch"-list and it will search for NZBs/torrents of these items every X hours. Once a correct release is found, matching the correct quality, it will send it to SABnzbd or download the .nzb or .torrent to a specified directory.

Moderators: JohnnyFive, clinton.hall

CP creates read-only folders

Postby jaansson » Thu Apr 17, 2014 9:14 pm

I've been messing around with this for a while now. When CP has processed any downloaded movies, it (most of the times) makes the folder unaccessible by setting group ownership to root. Sometimes it won't even finish processing everything. For example, one movie yesterday ended up just having an .nfo file in it. Another one had just the movie itself. None of them were accessible for me before I set group ownership of the folders manually to admin. It's getting pretty frustrating. Sometimes it works, though. I guess the reason for it not moving the files everytime would be due to the fact it creates the folder without permission for even CP itself to enter it? The log usually says something about permission.

Code: Select all
04-17 13:09:38 INFO [tato.core.plugins.renamer] Renaming "/volume1/Public/Downloads/movies/Noah.2014.PROPER.DVDRip.XviD-Sup.nfo 0164 - Noah.2014.PROPER.DVDRip.XviD-Sup.nfo yEnc (11).cp(tt1959490)/Noah.2014.PROPER.DVDRip.XviD-Sup/Noah.2014.PROPER.DVDRip.XviD-Sup.avi" to "/volume1/Public/Filmer/Noah (2014)/Noah(2014).avi"

04-17 13:09:56 ERROR [tato.core.plugins.renamer] Successfully moved file "/volume1/Public/Filmer/Noah (2014)/Noah(2014).avi", but something went wrong: Traceback (most recent call last):
  File "/volume1/.@plugins/AppCentral/couchpotato/CouchPotato/couchpotato/core/plugins/renamer/main.py", line 741, in moveFile
    shutil.move(old, dest)
  File "/usr/local/AppCentral/python/lib/python2.7/shutil.py", line 300, in move
    os.unlink(src)
OSError: [Errno 13] Permission denied: '/volume1/Public/Downloads/movies/Noah.2014.PROPER.DVDRip.XviD-Sup.nfo 0164 - Noah.2014.PROPER.DVDRip.XviD-Sup.nfo yEnc (11).cp(tt1959490)/Noah.2014.PROPER.DVDRip.XviD-Sup/Noah.2014.PROPER.DVDRip.XviD-Sup.avi'

04-17 13:09:56 ERROR [tato.core.plugins.renamer] Couldn't move file "/volume1/Public/Downloads/movies/Noah.2014.PROPER.DVDRip.XviD-Sup.nfo 0164 - Noah.2014.PROPER.DVDRip.XviD-Sup.nfo yEnc (11).cp(tt1959490)/Noah.2014.PROPER.DVDRip.XviD-Sup/Noah.2014.PROPER.DVDRip.XviD-Sup.avi" to "/volume1/Public/Filmer/Noah (2014)/Noah(2014).avi": Traceback (most recent call last):
  File "/volume1/.@plugins/AppCentral/couchpotato/CouchPotato/couchpotato/core/plugins/renamer/main.py", line 745, in moveFile
    os.unlink(old)
OSError: [Errno 13] Permission denied: '/volume1/Public/Downloads/movies/Noah.2014.PROPER.DVDRip.XviD-Sup.nfo 0164 - Noah.2014.PROPER.DVDRip.XviD-Sup.nfo yEnc (11).cp(tt1959490)/Noah.2014.PROPER.DVDRip.XviD-Sup/Noah.2014.PROPER.DVDRip.XviD-Sup.avi'

04-17 13:09:56 ERROR [tato.core.plugins.renamer] Failed ranaming the file "Noah.2014.PROPER.DVDRip.XviD-Sup.avi" : Traceback (most recent call last):
  File "/volume1/.@plugins/AppCentral/couchpotato/CouchPotato/couchpotato/core/plugins/renamer/main.py", line 548, in scan
    self.moveFile(src, dst, forcemove = not self.downloadIsTorrent(release_download) or self.fileIsAdded(src, group))
  File "/volume1/.@plugins/AppCentral/couchpotato/CouchPotato/couchpotato/core/plugins/renamer/main.py", line 745, in moveFile
    os.unlink(old)
OSError: [Errno 13] Permission denied: '/volume1/Public/Downloads/movies/Noah.2014.PROPER.DVDRip.XviD-Sup.nfo 0164 - Noah.2014.PROPER.DVDRip.XviD-Sup.nfo yEnc (11).cp(tt1959490)/Noah.2014.PROPER.DVDRip.XviD-Sup/Noah.2014.PROPER.DVDRip.XviD-Sup.avi'

04-17 13:09:56 ERROR [hpotato.core.plugins.base] Unable writing to file "/volume1/Public/Downloads/movies/Noah.2014.PROPER.DVDRip.XviD-Sup.nfo 0164 - Noah.2014.PROPER.DVDRip.XviD-Sup.nfo yEnc (11).cp(tt1959490)/Noah.2014.PROPER.DVDRip.XviD-Sup/Noah.2014.PROPER.DVDRip.XviD-Sup.failed_rename.ignore": Traceback (most recent call last):
  File "/volume1/.@plugins/AppCentral/couchpotato/CouchPotato/couchpotato/core/plugins/base.py", line 109, in createFile
    f = open(path, 'w+' if not binary else 'w+b')
IOError: [Errno 13] Permission denied: '/volume1/Public/Downloads/movies/Noah.2014.PROPER.DVDRip.XviD-Sup.nfo 0164 - Noah.2014.PROPER.DVDRip.XviD-Sup.nfo yEnc (11).cp(tt1959490)/Noah.2014.PROPER.DVDRip.XviD-Sup/Noah.2014.PROPER.DVDRip.XviD-Sup.failed_rename.ignore'


I've set file and folder permissions to 0766, just as I read in another thread. Would be nice to have it work properly, as this seem like a really awesome solution :roll:

I'd be very thankful for any help!
jaansson
 
Posts: 6
Joined: Thu Apr 17, 2014 9:02 pm

Re: CP creates read-only folders

Postby clinton.hall » Fri Apr 18, 2014 6:10 am

CouchPotato should run as admin user... If it is still running as root group I'll try and update the apkg to fix this.

What should the group be (admin, administrators, users?)
AS-604T
3 x ST4000DM0000 (Seagate 4TB) in Raid5
2 GB RAM expansion
AS-302T

Apps (user)
NZBGet - CouchPotato - SickBeard - Git - Python

Apps (maintainer):
NZBGet - BitTorrent Sync - Mylar - LazyLibrarian - Gamez
-Maintenance of Apps acquired from JohhnyFive since ADM2.0:
SABnzbd - CouchPotato - SickBeard - HeadPhones - Subsonic

About Me: http://fockwulf.wix.com/index
User avatar
clinton.hall
 
Posts: 831
Joined: Thu May 09, 2013 7:01 pm
Location: New Zealand

Re: CP creates read-only folders

Postby jaansson » Fri Apr 18, 2014 6:47 am

Administrator group seem to be what's working.

Thanks for your reply!
jaansson
 
Posts: 6
Joined: Thu Apr 17, 2014 9:02 pm

Re: CP creates read-only folders

Postby clinton.hall » Fri Apr 18, 2014 11:05 am

I had assumed setting a user in start-stop-daemon actually used the group for that user... apparently not.

I'll try and update soon.
AS-604T
3 x ST4000DM0000 (Seagate 4TB) in Raid5
2 GB RAM expansion
AS-302T

Apps (user)
NZBGet - CouchPotato - SickBeard - Git - Python

Apps (maintainer):
NZBGet - BitTorrent Sync - Mylar - LazyLibrarian - Gamez
-Maintenance of Apps acquired from JohhnyFive since ADM2.0:
SABnzbd - CouchPotato - SickBeard - HeadPhones - Subsonic

About Me: http://fockwulf.wix.com/index
User avatar
clinton.hall
 
Posts: 831
Joined: Thu May 09, 2013 7:01 pm
Location: New Zealand

Re: CP creates read-only folders

Postby jaansson » Sat Apr 19, 2014 10:16 pm

That's great, thanks for taking yourself time to help!
jaansson
 
Posts: 6
Joined: Thu Apr 17, 2014 9:02 pm

Re: CP creates read-only folders

Postby clinton.hall » Mon Apr 21, 2014 11:51 am

I have updated, but AppCentral isn't letting me upload right now.

if you want, you can edit /usr/local/AppCentral/couchpotato/CONTROL/start-stop.sh

change
Code: Select all
RUN_AS="admin"

to
Code: Select all
RUN_AS="admin:administrators"


This is the same for SABnzbdplus, SickBeard etc... I will submit them all once the issue with AppCentral is resolved.
AS-604T
3 x ST4000DM0000 (Seagate 4TB) in Raid5
2 GB RAM expansion
AS-302T

Apps (user)
NZBGet - CouchPotato - SickBeard - Git - Python

Apps (maintainer):
NZBGet - BitTorrent Sync - Mylar - LazyLibrarian - Gamez
-Maintenance of Apps acquired from JohhnyFive since ADM2.0:
SABnzbd - CouchPotato - SickBeard - HeadPhones - Subsonic

About Me: http://fockwulf.wix.com/index
User avatar
clinton.hall
 
Posts: 831
Joined: Thu May 09, 2013 7:01 pm
Location: New Zealand

Re: CP creates read-only folders

Postby keagy » Mon Jun 02, 2014 1:15 pm

clinton.hall wrote:CouchPotato should run as admin user... If it is still running as root group I'll try and update the apkg to fix this.

What should the group be (admin, administrators, users?)


I have the latest CouchPotato installed and it is running as admin user. The renamer is still creating a "default folder where the movie are moved to" where owner has read only access, and all other users have no access. I verified that the default user is admin, and the folder CHMOD is set to 777. Any ideas on how to fix?
keagy
 
Posts: 28
Joined: Sat May 24, 2014 1:30 pm

Re: CP creates read-only folders

Postby clinton.hall » Mon Jun 02, 2014 4:10 pm

Change the Folder CHMOD to 0777
I think that leading 0 being left of causes the first 7 to be applying the system bit...
AS-604T
3 x ST4000DM0000 (Seagate 4TB) in Raid5
2 GB RAM expansion
AS-302T

Apps (user)
NZBGet - CouchPotato - SickBeard - Git - Python

Apps (maintainer):
NZBGet - BitTorrent Sync - Mylar - LazyLibrarian - Gamez
-Maintenance of Apps acquired from JohhnyFive since ADM2.0:
SABnzbd - CouchPotato - SickBeard - HeadPhones - Subsonic

About Me: http://fockwulf.wix.com/index
User avatar
clinton.hall
 
Posts: 831
Joined: Thu May 09, 2013 7:01 pm
Location: New Zealand

Re: CP creates read-only folders

Postby keagy » Mon Jun 02, 2014 8:12 pm

clinton.hall wrote:Change the Folder CHMOD to 0777
I think that leading 0 being left of causes the first 7 to be applying the system bit...


Thanks, that fixed the problem. I don't why the standard install didn't include the leading zero.
keagy
 
Posts: 28
Joined: Sat May 24, 2014 1:30 pm

Return to CouchPotato

  • You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum
  • Who is online

    Users browsing this forum: No registered users and 2 guests