transmission-daemon: Couldn't create "/var/www/.config"

skygunner
Posts: 12
Joined: Mon Mar 08, 2010 4:34 am
Location: Brisbane,Australia

transmission-daemon: Couldn't create "/var/www/.config"

Postby skygunner » Mon Mar 08, 2010 4:39 am

Platform: 5.2-1

Core: 3.2.1-1

Fedora 12

transmission 1.91(10268)

I added several torrents to newly installed Amahi and transmission, it runs ok after chmod 777 //hda/torrents
But after reboot all transmission jobs were lost.

It seems transmission doesn't have permission to write into /var/www/.config to create it's settings.
The www directory is owned by root, but transmission-daemon runs as apache.
logs:

Code: Select all

Mar 8 21:19:23 localhost transmission-daemon: Port Forwarding State changed from "Not forwarded" to "Forwarded" (port-forwarding.c:87) Mar 8 21:19:23 localhost transmission-daemon: Port Forwarding (UPnP) Port forwarding successful! (upnp.c:197) Mar 8 21:19:23 localhost transmission-daemon: Port Forwarding (UPnP) Port forwarding through "http://192.168.1.1:1780/control?WANIPConnection", service "urn:schemas-upnp-org:service:WANIPConnection:1". (local address: 192.168.1.10:51413) (upnp.c:194) Mar 8 21:19:22 localhost transmission-daemon: Port Forwarding (UPnP) Local Address is "192.168.1.10" (upnp.c:107) Mar 8 21:19:22 localhost transmission-daemon: Port Forwarding (UPnP) Found Internet Gateway Device "http://192.168.1.1:1780/control?WANIPConnection" (upnp.c:105) Mar 8 21:19:21 localhost transmission-daemon: Couldn't save temporary file "/var/www/.config/transmission-daemon/settings.json.tmp.JhrfFY": No such file or directory (bencode.c:1673) Mar 8 21:19:21 localhost transmission-daemon: Using settings from "/var/www/.config/transmission-daemon" (daemon.c:422) Mar 8 21:19:21 localhost transmission-daemon: Port Forwarding (NAT-PMP) sendpublicaddressrequest succeeded (2) (natpmp.c:67) Mar 8 21:19:21 localhost transmission-daemon: Port Forwarding (NAT-PMP) initnatpmp succeeded (0) (natpmp.c:67) Mar 8 21:19:21 localhost transmission-daemon: DHT Generating new id (tr-dht.c:369) Mar 8 21:19:21 localhost transmission-daemon: RPC Server Whitelist enabled (rpc-server.c:949) Mar 8 21:19:21 localhost transmission-daemon: RPC Server Serving RPC and Web requests on port 9091 (rpc-server.c:945) Mar 8 21:19:21 localhost transmission-daemon: RPC Server Adding address to whitelist: 127.0.0.1 (rpc-server.c:772) Mar 8 21:19:21 localhost transmission-daemon: Transmission 1.91 (10268) started (session.c:611) Mar 8 21:19:21 localhost transmission-daemon: Couldn't create "/var/www/.config": Permission denied (utils.c:609) Mar 8 21:19:21 localhost transmission-daemon: Couldn't create "/var/www/.config": Permission denied (utils.c:609) Mar 8 21:19:21 localhost transmission-daemon: Couldn't create "/var/www/.config": Permission denied (utils.c:609)
Currently I made apache own the www directory.
Questions: Isn't the .config folder should be somewhere in a user's home directory?
Is it ok to let apache own the www directory?



Regards,
Last edited by skygunner on Tue Mar 09, 2010 6:52 am, edited 1 time in total.

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: transmission-daemon: Couldn't create "/var/www/.config"

Postby cpg » Tue Mar 09, 2010 3:23 am

To answer your question, transmission runs as both users and group "transmission," not apache.

This is painful to see. There was a new major release some week or two ago. And it changes a lot of things.
  • The new download location is

    Code: Select all

    /var/lib/transmission/Downloads/
  • When restarting the system, the console seems to freeze when starting the transmission daemon and not progress forward (in my case, it seems to be ok, other than not getting console logins but my hda is headless)
  • There are permissions issues. I just copy files out of that location and then remove them from the web interface
  • I don't see a way to get blocklists (similar to peerguardian or something)
This is really painful to see. We should take it to beta and bang it out there in testing land!

This app has the BEST user interface in any web app. Did I mention it's painful to observe the quality of it going down?
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: transmission-daemon: Couldn't create "/var/www/.config"

Postby gboudreau » Tue Mar 09, 2010 5:53 am

Download location was already correct; files are downloaded to /var/hda/files/torrents/
Even though the config file says otherwise, the init.d script has this path hard-coded, by launching the transmission-daemon with the -w option.

The freeze on start issue seems resolved, or only affects some users. I don't experience it, neither does a user in the channel. If anyone still experience that issue, please come to the IRC channel and talk to me.

Transmission-daemon ran as apache before, thus why you had errors about /var/www/.config and stuff. This has been changed to run as 'transmission'.

Permissions issues should be resolved. /var/hda/files/torrents should now be owned by transmission:users and be group-writable.

The blocklist is now updated when the service starts. The blocklist is found in /var/lib/transmission/.config/transmission-daemon/blocklists/

The problem where .torrents files added to the /var/hda/files/torrents/ directory would NOT be added in transmission every 5 minutes has been fixed.

The problem where torrents would disappear from transmission on restart has been fixed.

If you uninstall and re-install the app in your Dashboard, you should have all the above fixes.
- Guillaume Boudreau

skygunner
Posts: 12
Joined: Mon Mar 08, 2010 4:34 am
Location: Brisbane,Australia

Re: transmission-daemon: Couldn't create "/var/www/.config"

Postby skygunner » Tue Mar 09, 2010 6:50 am

ok, It seems my installation 1.91(10268) is already obsolete.
I just experienced the problem of "torrents would disappear from transmission on restart".
Let me try to reinstall it.

skygunner
Posts: 12
Joined: Mon Mar 08, 2010 4:34 am
Location: Brisbane,Australia

Re: transmission-daemon: Couldn't create "/var/www/.config"

Postby skygunner » Wed Mar 10, 2010 2:29 am

Download location was already correct; files are downloaded to /var/hda/files/torrents/
Even though the config file says otherwise, the init.d script has this path hard-coded, by launching the transmission-daemon with the -w option.

The freeze on start issue seems resolved, or only affects some users. I don't experience it, neither does a user in the channel. If anyone still experience that issue, please come to the IRC channel and talk to me.

Transmission-daemon ran as apache before, thus why you had errors about /var/www/.config and stuff. This has been changed to run as 'transmission'.

Permissions issues should be resolved. /var/hda/files/torrents should now be owned by transmission:users and be group-writable.

The blocklist is now updated when the service starts. The blocklist is found in /var/lib/transmission/.config/transmission-daemon/blocklists/

The problem where .torrents files added to the /var/hda/files/torrents/ directory would NOT be added in transmission every 5 minutes has been fixed.

The problem where torrents would disappear from transmission on restart has been fixed.

If you uninstall and re-install the app in your Dashboard, you should have all the above fixes.
Seems it works as you described, but after running for a night and rebooted, transmission daemon can no longer started anymore, error log

Code: Select all

Mar 10 19:24:22 localhost transmission-daemon: transmission-daemon Error loading config file -- exiting. (daemon.c:400) Mar 10 19:24:21 localhost transmission-daemon: transmission-daemon Error loading config file -- exiting. (daemon.c:400)
Any ideas on how to diagnostic this problem?

Ok, for some reason, the settings.json is wiped out, it's empty so load config file failed.
Another problem is the blocklists, yes it updates, but it updates hundreds times a day and the old files are not deleted? There're heaps of level1.gz.* files now.

skygunner
Posts: 12
Joined: Mon Mar 08, 2010 4:34 am
Location: Brisbane,Australia

Re: transmission-daemon: Couldn't create "/var/www/.config"

Postby skygunner » Wed Mar 10, 2010 4:38 am

I guess the console command
service transmission-daemon restart
is not updated yet as it will start using
-T blocklists -g /var/lib/transmission/.config/transmission
and the download dir is something lile /var/lib/Download

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: transmission-daemon: Couldn't create "/var/www/.config"

Postby gboudreau » Wed Mar 10, 2010 4:56 am

Here's how you can fix:

As root:

Code: Select all

service amahi-transmission stop rm -rf /var/lib/transmission/.config/transmission-daemon/blocklists/* wget -O /etc/init.d/amahi-transmission http://fpaste.org/dLj1/raw/ wget -O /var/lib/transmission/.config/transmission-daemon/settings.json http://fpaste.org/6yzc/raw/ service amahi-transmission start
This new init.d script will prevent duplicate level1.gz files, will try to backup your settings.json file, and will use the backup copy if the settings.json file is missing on start, or if it's less than 20 bytes.
- Guillaume Boudreau

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: transmission-daemon: Couldn't create "/var/www/.config"

Postby gboudreau » Wed Mar 10, 2010 4:57 am

I guess the console command
service transmission-daemon restart
is not updated yet as it will start using
-T blocklists -g /var/lib/transmission/.config/transmission
and the download dir is something lile /var/lib/Download
You should not start the "transmission-daemon" service, you should start the "amahi-transmission" service.
It starts the daemon differently.

If you check, only amahi-transmission should be set to start on boot:

Code: Select all

[gb@hda transmission]$ chkconfig --list transmission-daemon transmission-daemon 0:off 1:off 2:off 3:off 4:off 5:off 6:off [gb@hda transmission]$ chkconfig --list amahi-transmission amahi-transmission 0:off 1:off 2:on 3:on 4:on 5:on 6:off
- Guillaume Boudreau

skygunner
Posts: 12
Joined: Mon Mar 08, 2010 4:34 am
Location: Brisbane,Australia

Re: transmission-daemon: Couldn't create "/var/www/.config"

Postby skygunner » Wed Mar 10, 2010 5:58 am

Thanks, I quite impressed by your hard work.

Ok, I understand we should use amahi-transmission service with hda.
I think we could totally disable/remove service transmission-daemon.
For people like me who haven't read the hda manual may get confused.

Who is online

Users browsing this forum: No registered users and 17 guests