[SOLVED] Failed to create cache dir (linux/transmission)

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
liabilityman
Posts: 4
Joined: 11 May 2014, 17:58

[SOLVED] Failed to create cache dir (linux/transmission)

Post by liabilityman »

Running transmission on Ubuntu 12.04 server. Just installed filebot v4.0. Followed this guide: http://www.filebot.net/forums/viewtopic ... 1561#p3380 for setting up transmission postprocess script.

Finally managed to get the script running however it seems to fail at creating the cache files. My guess is because the script is being called by the transmission-deamon user which does not have a home directory. I get no such error when running directly from the command line under my own user account.

I assume the default cache location is /home/<username>/.filebot/cache/0 but because that doesn't exist for the transmission-daemon user, it just tries to access /.filebot/cache/0 which is just wrong.

How can I tell filebot to use a different cache location? Or is there a better way to fix this?

Thanks

amc.log:

Code: Select all

May 11, 2014 10:27:58 AM net.sourceforge.filebot.Main initializeCache
WARNING: java.io.IOException: Failed to create cache dir: /.filebot/cache/0
java.io.IOException: Failed to create cache dir: /.filebot/cache/0
	at net.sourceforge.filebot.Main.initializeCache(Main.java:438)
	at net.sourceforge.filebot.Main.main(Main.java:142)

May 11, 2014 10:27:58 AM java.util.prefs.FileSystemPreferences$1 run
WARNING: Couldn't create user preferences directory. User preferences are unusable.
May 11, 2014 10:27:58 AM java.util.prefs.FileSystemPreferences$1 run
WARNING: java.io.IOException: No such file or directory
Parameter: artwork = n
Parameter: ut_dir = /media/data/torrents/complete/****.mp4
Parameter: ut_kind = multi
Parameter: ut_title = ****.mp4
JNA Warning: IOException removing temporary files: JNA temporary directory '/.filebot/temp' does not exist
May 11, 2014 10:28:06 AM net.sourceforge.filebot.mediainfo.MediaInfo <clinit>
WARNING: Failed to preload libzen
Input: /media/data/torrents/complete/****.mp4
Group: [tvs:****] => [****.mp4]
Rename episodes using [TheTVDB]
Auto-detected query: [****]
CacheException: Disk store path can't be created: /.filebot/cache/default
Done ヾ(@⌒ー⌒@)ノ
Last edited by liabilityman on 12 May 2014, 19:21, edited 1 time in total.
User avatar
rednoah
The Source
Posts: 23940
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Failed to create cache dir (linux/transmission)

Post by rednoah »

$HOME needs to be defined, and it normally is in any reasonable Linux distro / bash instance.
:idea: Please read the FAQ and How to Request Help.
liabilityman
Posts: 4
Joined: 11 May 2014, 17:58

Re: Failed to create cache dir (linux/transmission)

Post by liabilityman »

Thanks rednoah. I managed to fix this by giving the debian-transmission user a real home directory, located at /var/lib/transmission-daemon
Here are the steps for anyone else who encounters this (which im surprised isn't more people as I have a standard transmission installation).

First stop the transmission-daemon:

Code: Select all

service transmission-daemon stop
Then I set the home location of the user to a place that actually exists:

Code: Select all

usermod debian-transmission -d /var/lib/transmission-daemon
I then ensured the user could write to the directory:

Code: Select all

chown debian-transmission /var/lib/transmission-daemon
Then restart the deamon and now my filebot script works!
Post Reply