[Support Thread] SAB / SB / CP / HP / Maraschino / LL / Gamez

Status
Not open for further replies.

ThomasDK81

Dabbler
Joined
Mar 19, 2012
Messages
49
Hi Joshua,

Thanks for the plugins, a donation is coming your way, well deserved.
All the talk about permissions with Transmission and these plugins, could perhaps be resolved by changing the user of the Transmission daemon to media, like the other plugins. (instead of chmod 777'ing it all).
Do you have any idea how to do this? You know how the plugins a constructed, so I figured maybe you would know.
I tried my best and my problem is that rc.conf is rewritten every time the daemon is start. transmission_user="media" should set the user, which is "transmission" by default/if nothing is set.

Cheers,
Thomas
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi Joshua,

Thanks for the plugins, a donation is coming your way, well deserved.
All the talk about permissions with Transmission and these plugins, could perhaps be resolved by changing the user of the Transmission daemon to media, like the other plugins. (instead of chmod 777'ing it all).
Do you have any idea how to do this? You know how the plugins a constructed, so I figured maybe you would know.
I tried my best and my problem is that rc.conf is rewritten every time the daemon is start. transmission_user="media" should set the user, which is "transmission" by default/if nothing is set.

Cheers,
Thomas

yup it might be little hard. If I remember correctly a specific rc.conf is in /usr/pbi/transmission-amd64/etc. this is then added to the rc.conf during enabling/starting the plugin from the gui. i don't think the transmission rc.conf is generated dynamically so just edit the rc.conf

Code:
vi /usr/pbi/transmission-amd64/etc/rc.conf


you always want to look at the ownership of any file/folder transmission needs to edit
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
[root@freenas] /mnt/DISK1/software/pbi# ls -l sabnzbd-amd64/data/
total 18
drwxrwxrwx 5 40001 40001 9 Jan 24 08:10 ./
drwxrwxrwx 11 1000 1000 19 Jan 23 22:21 ../
drwxrwxrwx 4 40001 40001 4 Jan 23 22:25 Downloads/
drwxrwxrwx 2 40001 40001 9 Jan 24 18:49 admin/
-rwxrwxrwx 1 40001 40001 3374 Jan 24 18:46 config.ini*
-rwxrwxrwx 1 40001 40001 3374 Jan 24 18:46 config.ini.bak*
drwxrwxrwx 2 40001 40001 4 Jan 23 22:22 logs/
-rwxrwxrwx 1 40001 40001 6 Jan 23 22:23 sabnzbd-8080.pid*
-rwxrwxrwx 1 40001 40001 6 Jan 24 18:44 sabnzbd-8082.pid*
[root@freenas] /mnt/DISK1/software/pbi#

[root@freenas] /mnt/DISK1/software/pbi/couchpotato-amd64# ls -l data/
total 2935
drwxrwxrwx 5 40001 40001 11 Jan 24 19:36 ./
drwxrwxrwx 11 1000 1000 18 Jan 23 14:44 ../
drwxrwxrwx 3 40001 40001 4 Jan 25 01:37 cache/
-rwxrwxrwx 1 40001 40001 4398 Jan 24 19:46 config.ini*
-rw-rw-rw- 1 40001 40001 1673216 Jan 24 23:19 couchpotato.db
-rwxrwxrwx 1 40001 40001 32768 Jan 25 01:37 couchpotato.db-shm*
-rwxrwxrwx 1 40001 40001 1052224 Jan 25 01:37 couchpotato.db-wal*
-rw-rw-rw- 1 40001 40001 6 Jan 24 19:36 couchpotato.pid
drwxrwxrwx 5 40001 40001 5 Jan 24 19:36 db_backup/
drwxrwxrwx 2 40001 40001 4 Jan 23 14:44 logs/
-rwxrwxrwx 1 40001 40001 67584 Jan 24 02:45 xcouchpotato.db*



[root@freenas] /mnt/DISK1/software/pbi/sickbeard-amd64# ls -l data/
total 88
drwxrwxrwx 4 40001 40001 11 Jan 29 08:10 ./
drwxrwxrwx 11 1000 1000 19 Jan 23 14:55 ../
drwxrwxrwx 2 40001 40001 4 Jan 27 06:10 Logs/
drwxrwxrwx 2 40001 40001 2 Jan 23 14:56 cache/
-rwxrwxrwx 1 40001 40001 43008 Jan 29 08:10 cache.db*
-rwxrwxrwx 1 40001 40001 3543 Jan 24 08:09 config.ini*
-rwxrwxrwx 1 40001 40001 3544 Jan 23 14:56 config.ini.v1*
-rwxrwxrwx 1 40001 40001 10240 Jan 24 02:56 sickbeard.db*
-rwxrwxrwx 1 40001 40001 9216 Jan 23 14:56 sickbeard.db.v0*
-rwxrwxrwx 1 40001 40001 10240 Jan 23 14:56 sickbeard.db.v10*
-rwxrwxrwx 1 40001 40001 6 Jan 24 08:09 sickbeard.pid*


It doesn't show usernames.

that's cause you did it from the FreeNAS userland. this has been explained before in the locked super long thread. do the same thing from the jail's userland. I don't see a problem if 4001 is the user 'media' in the jail.
 

ThomasDK81

Dabbler
Joined
Mar 19, 2012
Messages
49
yup it might be little hard. If I remember correctly a specific rc.conf is in /usr/pbi/transmission-amd64/etc. this is then added to the rc.conf during enabling/starting the plugin from the gui. i don't think the transmission rc.conf is generated dynamically so just edit the rc.conf

Code:
vi /usr/pbi/transmission-amd64/etc/rc.conf


you always want to look at the ownership of any file/folder transmission needs to edit

There is /usr/pbi/transmission-amd64/etc/rc.d/transmission:
Code:
. /etc/rc.subr                                                                  
                                                                                
name="transmission"                                                             
rcvar=transmission_enable                                                       
                                                                                
command=/usr/pbi/transmission-amd64/bin/transmission-daemon                     
                                                                                
load_rc_config ${name}                                                          
                                                                                
: ${transmission_enable:="NO"}                                                  
: ${transmission_user:="transmission"}                                          
: ${transmission_conf_dir="/usr/pbi/transmission-amd64/etc/transmission/home"}  
: ${transmission_download_dir="/usr/pbi/transmission-amd64/etc/transmission/home
/Downloads"}                                                                    
                                                                                
transmission_flags=" \                                                          
        ${transmission_watch_dir:+-c ${transmission_watch_dir}} \               
        ${transmission_conf_dir:+-g ${transmission_conf_dir}} \                 
        ${transmission_download_dir:+-w ${transmission_download_dir}} \         
        ${transmission_flags}"                                                  
                                                                                
run_rc_command "$1"


Changing the transmission_user has no effect on the rc.conf

I'll keep digging, just hoped you knew the answer :)
 

hailbaal

Cadet
Joined
Jan 22, 2013
Messages
8
Joshua,

I tried searching the superlong thread. I wasn't able to find a solution for this. I searched every page for userland. I found somethings but nothing that actually looks like what I'm searching for. I don't understand how I find the information above from the media user. I did this as a root user.
 

hailbaal

Cadet
Joined
Jan 22, 2013
Messages
8
From the shell I did the following:
jls
JID IP Address Hostname Path
2 - software /mnt/DISK1/jail/software
jexec 2 /bin/tcsh
software# cd usr/
software# cd pbi/
software# chmod -R 777 sabnzbd-amd64/
software# chmod -R 777 couchpotato-amd64/
software# chmod -R 777 sickbeard-amd64/

it still fails :S
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
From the shell I did the following:
jls
JID IP Address Hostname Path
2 - software /mnt/DISK1/jail/software
jexec 2 /bin/tcsh
software# cd usr/
software# cd pbi/
software# chmod -R 777 sabnzbd-amd64/
software# chmod -R 777 couchpotato-amd64/
software# chmod -R 777 sickbeard-amd64/

it still fails :S

Looks like it might not be permissions. So something else is screwed up. You could backup you data folders and reinstall and check if a fresh plugin install works.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
There is /usr/pbi/transmission-amd64/etc/rc.d/transmission:
Code:
. /etc/rc.subr                                                                  
                                                                                
name="transmission"                                                             
rcvar=transmission_enable                                                       
                                                                                
command=/usr/pbi/transmission-amd64/bin/transmission-daemon                     
                                                                                
load_rc_config ${name}                                                          
                                                                                
: ${transmission_enable:="NO"}                                                  
: ${transmission_user:="transmission"}                                          
: ${transmission_conf_dir="/usr/pbi/transmission-amd64/etc/transmission/home"}  
: ${transmission_download_dir="/usr/pbi/transmission-amd64/etc/transmission/home
/Downloads"}                                                                    
                                                                                
transmission_flags=" \                                                          
        ${transmission_watch_dir:+-c ${transmission_watch_dir}} \               
        ${transmission_conf_dir:+-g ${transmission_conf_dir}} \                 
        ${transmission_download_dir:+-w ${transmission_download_dir}} \         
        ${transmission_flags}"                                                  
                                                                                
run_rc_command "$1"


Changing the transmission_user has no effect on the rc.conf

I'll keep digging, just hoped you knew the answer :)

You need to edit the rc.conf in the transmission etc, not the init file. the rc.conf is read after the init file when a service is called. So if you don't see the rc.conf in /usr/pbi/transmission-amd64/etc/ then it is dynamically created. You need to edit the python scripts then. I think it's in the transmissionUI folder
 

srtviperjr

Dabbler
Joined
Jan 30, 2013
Messages
20
I am trying to disable the rpc authentication for transmission, currently by default it prompts for username and password (both are blank by default). Not a big deal, but kind of annoying. I made sure the rpc authentication check box is not checked in the config but it doesn't seem to affect it.

I have read in other (non pbi / freenas) forums that there is a default --auth which is set for the transmission-daemon file that over-rides. I can't find this anywhere in the jail. Other options were to add the flag -T instead of -t but that seems to get overwritten and doesn't stick.

Any ideas? Others experiencing the same thing?

Excerpt from the other thread (the file referenced does not exist in the jail):

Even though I had stopped the daemon before editing /etc/transmission-daemon/settings.json, the "rpc-authentication-required" setting ALWAYS reverted itself when starting the daemon back up. This basically meant I could not disable authentication. Other settings were keeping, so after some poking around I found the problem. transmission-daemon was being started with the --auth flag because of its options in /etc/default/transmission-daemon.


To Fix:
Edit "/etc/default/transmission-daemon".
It has the following line:
Code:
OPTIONS="--auth --config-dir $CONFIG_DIR"
Change the line to:
Code:
OPTIONS="--config-dir $CONFIG_DIR"
Now, transmission-daemon will listen to settings.json for the "rpc-authentication-required" setting, instead of overwriting it.
 

Wolfeman0101

Patron
Joined
Jun 14, 2012
Messages
428
So when I start my plugin folder all my plugins start but in the plugin GUI they all show as "off". If I click one it says "Some error occurred". Any help?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
So when I start my plugin folder all my plugins start but in the plugin GUI they all show as "off". If I click one it says "Some error occurred". Any help?

You can check and see if the pidfile shows up, that's how the gui checks to see if the plugin started correctly.

/usr/pbi/PLUGIN-amd64/data/PLUGIN.pid
/usr/pbi/PLUGIN-amd64/data/PLUGIN-PORT.pid - sab's pidfile is a bit different
 

Wolfeman0101

Patron
Joined
Jun 14, 2012
Messages
428
You can check and see if the pidfile shows up, that's how the gui checks to see if the plugin started correctly.

/usr/pbi/PLUGIN-amd64/data/PLUGIN.pid
/usr/pbi/PLUGIN-amd64/data/PLUGIN-PORT.pid - sab's pidfile is a bit different
Yeah there are .pid files there. Still showing off in the GUI and I get that error.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Yeah there are .pid files there. Still showing off in the GUI and I get that error.

Do the official plugins show up as working correctly?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
I installed MiniDLNA and now all of them are working fine.

Interesting, maybe the act of installing it (re)started the services that were looking for the pidfile? Just a wild guess. Glad it's working.
 

ThomasDK81

Dabbler
Joined
Mar 19, 2012
Messages
49
You need to edit the rc.conf in the transmission etc, not the init file. the rc.conf is read after the init file when a service is called. So if you don't see the rc.conf in /usr/pbi/transmission-amd64/etc/ then it is dynamically created. You need to edit the python scripts then. I think it's in the transmissionUI folder

Just to others who are interested I found out how to make transmission run as the same user(media) as these plugins.
Inside the jail edit the file
Code:
/usr/local/etc/rc.d/transmission
.
transmission_user is as default set to transmission, change it to what ever you like. I changed it to media, so the permissions between sickbeard and transmission is less complicated.

PS. Joshua I send a donation via paypal, hope I did it right :)
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Just to others who are interested I found out how to make transmission run as the same user(media) as these plugins.
Inside the jail edit the file
Code:
/usr/local/etc/rc.d/transmission
.
transmission_user is as default set to transmission, change it to what ever you like. I changed it to media, so the permissions between sickbeard and transmission is less complicated.

PS. Joshua I send a donation via paypal, hope I did it right :)

Ohh, I thought someone already tried that, glad it worked.

Yup got it, Thanks! =]
 
Status
Not open for further replies.
Top