Couch Potato Permissions

Status
Not open for further replies.

Supa

Patron
Joined
Jan 10, 2014
Messages
204
No idea what's going on but I have no permissions to update or use the renamer.

I've tried:

chown -R guest:guest /usr/pbi/couchpotato-amd64/etc

and

zcwf5HQ.png


What else should i check?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
ls -l /path/to/file/with/permission/errors
 

Supa

Patron
Joined
Jan 10, 2014
Messages
204
Looks like this allowed me to update via the gui by running this:

chown -R guest:guest /usr/pbi/couchpotato-amd64/share/couchpotato

Pretty sure though the permission folder was /usr/pbi/couchpotato-amd64/etc

I'll have to wait and see if I get any when the renamer runs.

Any idea what it's complaining about here?

trvKeVo.png


Also saying,

Unable to write file "/media/downloads/Movies/

File "/usr/pbi/couchpotato-amd64/share/couchpotato/CouchPotatoServer/couchpotato/core/plugins/base.py", line 146, in createFile os.chmod(path, Env.getPermission('file'))
 
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Yup, CP needs write access to the /usr/pbi/couchpotato-amd64/share/couchpotato/CouchPotatoServer folder to update itself.

Please show the output of the following...
Code:
ls -l /media/downloads/Movies/
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
hmm, maybe the Movies folder isn't writable?
Code:
ls -l /media/downloads/
 

Supa

Patron
Joined
Jan 10, 2014
Messages
204
Yeah not sure... Made sure to reset the plugin as well.

eU8FgKj.png


Unable to write file "/media/downloads/Movies/..........

File "/usr/pbi/couchpotato-amd64/share/couchpotato/CouchPotatoServer/couchpotato/core/plugins/base.py", line 146, in createFile os.chmod(path, Env.getPermission('file'))

Operation not permitted: '/media/downloads/Movies/.....
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Yeah not sure... Made sure to reset the plugin as well.

eU8FgKj.png


Unable to write file "/media/downloads/Movies/..........

File "/usr/pbi/couchpotato-amd64/share/couchpotato/CouchPotatoServer/couchpotato/core/plugins/base.py", line 146, in createFile os.chmod(path, Env.getPermission('file'))

Operation not permitted: '/media/downloads/Movies/.....
Well from what you've presented CouchPotato should be able to write in the Movies directory.
Since when did this issue start happening?

Also, you might want to ask on the CouchPotato forum. They might better know what the code is doing here.
 

Supa

Patron
Joined
Jan 10, 2014
Messages
204
So if I re-install Couchpotato which commands should I run to give full permissions to it?

Add user:
d0zMkfd.png


- chown -R guest:guest /usr/pbi/couchpotato-amd64/share/couchpotato


Anything else? All my media folders have guest:guest permissions.

Also... for some reason I can never turn on the plugin after a while... Just says off even though the jail is running.

HjxQyHc.png


Every downloaded file has "guest guest" permissions but couchpotato won't rename it (permission error) and complains when it writes the file as well.
 
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
So if I re-install Couchpotato which commands should I run to give full permissions to it?

Add user:
d0zMkfd.png


- chown -R guest:guest /usr/pbi/couchpotato-amd64/share/couchpotato


Anything else? All my media folders have guest:guest permissions.

Also... for some reason I can never turn on the plugin after a while... Just says off even though the jail is running.

HjxQyHc.png


Every downloaded file has "guest guest" permissions but couchpotato won't rename it (permission error) and complains when it writes the file as well.
when you say CP isn't starting, is it actually not starting (accessing the CP webui doesn't work) or is it the Plugins > Installed tab not working?

I think that should be all you need. but maybe your starting issue is caused by guest not owning the pidfile directory? /var/run/couchpotato

can you show the permissions of the folder couchpotato should be renaming to?
'ls -l /path/to/couchpotato/manage/directory'
 

Supa

Patron
Joined
Jan 10, 2014
Messages
204
Sorry I was referring to just the installed list. The GUI runs fine.

How would I check if the user is owning the pidfile /var/run/couchpotato directory?

It's downloading to /media/downloads/TV and renaming to /media/Movies

MVmWoTZ.png
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
It wouldn't start if it didn't, so since it's working I'm assuming it owns it. If in doubt just stop couchpotato, delete the directory, and it will create it own its own when you start it.
Code:
service couchpotato stop
rm -r /var/run/couchpotato
service couchpotato start


From the screenshot you showed me, 'guest' on your freenas host likely isn't mapped to UID 1001.... which is strange because both the jail and your host say the TV and Movies folders are owned by 'guest'.
Read the first point under "Facts" here https://forums.freenas.org/index.ph...plugins-write-permissions-to-your-data.27273/
 

Supa

Patron
Joined
Jan 10, 2014
Messages
204
8vmV0AQ.png


Does this not mean it's mapped to UID 1001?


As for why it doesn't show up as "On" this is what CP outputs.

TXJ8rC8.png


From my research:

- Make sure there isn't anything else running on port 5050 [I can't find anything]
- "ps aux | grep couch" This checks and makes sure there isn't a 'hung' instance of CP running. Not sure what my output means though.
yMq0jii.png

- ps | grep couchpotato
KklhOE8.png

- netstat -tulpn | grep 5050 [You can also check to see what process is using 5050.. although i don't' think this command worked for me]

"Something is already running on the port. Via terminal, get the PID of the script running on port 5050: "fuser -v 5050/tcp" [not sure if this one works on freebsd either] Then kill that PID, if it says something like "python""

Hmm tried changing it to 6060 and that says 'in use' as well.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
8vmV0AQ.png


Does this not mean it's mapped to UID 1001?


As for why it doesn't show up as "On" this is what CP outputs.

TXJ8rC8.png


From my research:

- Make sure there isn't anything else running on port 5050 [I can't find anything]
- "ps aux | grep couch" This checks and makes sure there isn't a 'hung' instance of CP running. Not sure what my output means though.
yMq0jii.png

- ps | grep couchpotato
KklhOE8.png

- netstat -tulpn | grep 5050 [You can also check to see what process is using 5050.. although i don't' think this command worked for me]

"Something is already running on the port. Via terminal, get the PID of the script running on port 5050: "fuser -v 5050/tcp" [not sure if this one works on freebsd either] Then kill that PID, if it says something like "python""

Hmm tried changing it to 6060 and that says 'in use' as well.
From that screen shot it looks like you have it mapped correctly, but something is defintly weird because another screenshot showed folders owned by the group 'guest' and the other folders owner by the group '1001' which means they aren't the same group.

I would use 'sockstat | grep 5050' to show what is using that port.
Another thing you could do is restart the jail which would kill any currently running processes and only startup a single instance of couchpotato.
 

Supa

Patron
Joined
Jan 10, 2014
Messages
204
Hmmm ''sockstat | grep 5050' came up with nothing. I'm just gonna delete the plugin and reinstall.

I narrowed down the 'address in use'.

Right after I run this:

zcwf5HQ.png


I get the address error. About it being in use. error: [Errno 48] Address already in use. And then it won't turn on.. even though the gui works. Any idea how to revert it?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hmmm ''sockstat | grep 5050' came up with nothing. I'm just gonna delete the plugin and reinstall.

I narrowed down the 'address in use'.

Right after I run this:

zcwf5HQ.png


I get the address error. About it being in use. error: [Errno 48] Address already in use. And then it won't turn on.. even though the gui works. Any idea how to revert it?
If the couchpotato gui is responding it is turning on. Just the Plugins > Installed tab isn't working correctly for some reason.
'service couchpotato status' should confirm if it is on.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
It probably isn't running and you are just using a cached version of the page.
please run the commands related to the pidfile I posted earlier.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
N8FCPdp.png


That one right?

Looks like it WAS able to turn on after.
Yup, hmm so it isn't starting for some reason. Can you try this just incase.
Code:
chown -R guest:guest /usr/pbi/couchpotato-amd64/share/couchpotato/*
 
Status
Not open for further replies.
Top