java.io.FileNotFoundException: $HOME/.filebot/preferences.backup.xml (Permission denied)

Support for Ubuntu and other Desktop Linux distributions
Post Reply
User avatar
Mustang
Posts: 22
Joined: 07 Aug 2017, 15:50

java.io.FileNotFoundException: $HOME/.filebot/preferences.backup.xml (Permission denied)

Post by Mustang »

Hello again rednoah. As always, thanks for all the hard work and putting out a great product. I was delighted to see you offer a new licensed product for all platforms. I use filebot on both Windows and Linux (Ubuntu LTS 16.04). I went ahead and purchased a lifetime license because I love the product.

Unfortunately, every time I try to upgrade, I have problems. (I hated the whole Snap thing) I just upgraded from 4.7.9 to 4.8.2. I downloaded the DEB package from a link in one of your posts. I installed it using "sudo dpkg -i Filebot..." I then licensed the product using "sudo filebot --license /path/to/location" (I downloaded it to My Downloads). Filebot opened up and said it was registered. I was pretty excited, but...

Now, when I run filebot I get an error saying the product isn't licensed. Of note, I only have one user on this machine. Here are some results for you:

When I ran the license CLI:

Code: Select all

rick@LaptopServer:~$ sudo filebot --license Downloads/Filebot/FileBot_License_PX6706377.psm
FileBot License PX6706377 (Valid-Until: 2069-01-11) has been activated successfully.
Jan 11, 2019 7:50:59 PM java.util.prefs.FileSystemPreferences$6 run
WARNING: Prefs file removed in background /root/.java/.userPrefs/prefs.xml
rick@LaptopServer:~$
When I run filebot from the CLI after the licensing:

Code: Select all

rick@LaptopServer:~$ filebot
java.io.FileNotFoundException: /home/rick/.filebot/preferences.backup.xml (Permission denied)
java.io.FileNotFoundException: /home/rick/.filebot/preferences.backup.xml (Permission denied)
	at net.filebot.Settings.store(Settings.java:284)
	at net.filebot.Main.lambda$startUserInterface$4(Main.java:241)
	at net.filebot.util.ui.SwingUI$1.windowClosing(SwingUI.java:346)

rick@LaptopServer:~$
Sysinfo results:

Code: Select all

rick@LaptopServer:~$ filebot -script fn:sysinfo
FileBot 4.8.2 (r5789)
JNA Native: 5.2.2
MediaInfo: 18.05
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
GVFS: PlatformGVFS [/run/user/1000/gvfs]
Script Bundle: 2018-11-29 (r539)
Groovy: 2.5.1
JRE: Java(TM) SE Runtime Environment 10.0.2
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 950 MB Max Memory / 36 MB Used Memory
OS: Linux (amd64)
HW: Linux LaptopServer 4.15.0-43-generic #46~16.04.1-Ubuntu SMP Fri Dec 7 13:31:08 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
DATA: /home/rick/.filebot
Package: DEB
License: java.io.FileNotFoundException: /home/rick/.filebot/cache/0/license.data (Permission denied)
Done ヾ(@⌒ー⌒@)ノ

Code: Select all

rick@LaptopServer:~$ filebot -script fn:sysenv
# Environment Variables #
PATH: /home/rick/bin:/home/rick/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
XAUTHORITY: /home/rick/.Xauthority
XMODIFIERS: @im=ibus
XDG_DATA_DIRS: /usr/share/ubuntu:/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop
GDMSESSION: ubuntu
MANDATORY_PATH: /usr/share/gconf/ubuntu.mandatory.path
GTK_IM_MODULE: ibus
DBUS_SESSION_BUS_ADDRESS: unix:abstract=/tmp/dbus-w1V5BCRWlW
DEFAULTS_PATH: /usr/share/gconf/ubuntu.default.path
XDG_CURRENT_DESKTOP: Unity
UPSTART_SESSION: unix:abstract=/com/ubuntu/upstart-session/1000/1294
QT4_IM_MODULE: xim
SESSION_MANAGER: local/LaptopServer:@/tmp/.ICE-unix/1537,unix/LaptopServer:/tmp/.ICE-unix/1537
QT_LINUX_ACCESSIBILITY_ALWAYS_ON: 1
LOGNAME: rick
JOB: unity-settings-daemon
PWD: /home/rick
DERBY_HOME: /usr/lib/jvm/java-8-oracle/db
IM_CONFIG_PHASE: 1
LANGUAGE: en_US
WINDOWID: 60817418
SHELL: /bin/bash
LESSOPEN: | /usr/bin/lesspipe %s
UNITY_HAS_3D_SUPPORT: true
GTK2_MODULES: overlay-scrollbar
INSTANCE: 
J2SDKDIR: /usr/lib/jvm/java-8-oracle
GNOME_DESKTOP_SESSION_ID: this-is-deprecated
UPSTART_INSTANCE: 
GTK_MODULES: gail:atk-bridge:unity-gtk-module
J2REDIR: /usr/lib/jvm/java-8-oracle/jre
CLUTTER_IM_MODULE: xim
XDG_SESSION_PATH: /org/freedesktop/DisplayManager/Session0
COMPIZ_BIN_PATH: /usr/bin/
SESSIONTYPE: gnome-session
XDG_SESSION_DESKTOP: ubuntu
LS_COLORS: rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
SHLVL: 1
LESSCLOSE: /usr/bin/lesspipe %s %s
COMPIZ_CONFIG_PROFILE: ubuntu
QT_IM_MODULE: ibus
UPSTART_JOB: unity7
JAVA_HOME: /usr/share/filebot/jre
TERM: xterm-256color
XDG_CONFIG_DIRS: /etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg
LANG: en_US.UTF-8
GNOME_KEYRING_CONTROL: 
XDG_SEAT_PATH: /org/freedesktop/DisplayManager/Seat0
XDG_SESSION_ID: c1
XDG_SESSION_TYPE: x11
DISPLAY: :0
UNITY_DEFAULT_PROFILE: unity
_: /usr/bin/filebot
GDM_LANG: en_US
XDG_GREETER_DATA_DIR: /var/lib/lightdm-data/rick
UPSTART_EVENTS: xsession started
GPG_AGENT_INFO: /home/rick/.gnupg/S.gpg-agent:0:1
DESKTOP_SESSION: ubuntu
SESSION: ubuntu
USER: rick
XDG_MENU_PREFIX: gnome-
VTE_VERSION: 4205
QT_ACCESSIBILITY: 1
SSH_AUTH_SOCK: /run/user/1000/keyring/ssh
XDG_SEAT: seat0
QT_QPA_PLATFORMTHEME: appmenu-qt5
XDG_VTNR: 7
XDG_RUNTIME_DIR: /run/user/1000
HOME: /home/rick
GNOME_KEYRING_PID: 


# Java System Properties #
sun.desktop: gnome
awt.toolkit: sun.awt.X11.XToolkit
java.specification.version: 10
file.encoding.pkg: sun.io
sun.cpu.isalist: 
sun.jnu.encoding: UTF-8
java.class.path: /usr/share/filebot/jar/filebot.jar
net.filebot.AcoustID.fpcalc: /usr/share/filebot/lib/fpcalc
java.vm.vendor: "Oracle Corporation"
grape.root: /home/rick/.filebot/grape
useExtendedFileAttributes: true
sun.arch.data.model: 64
jna.library.path: /usr/share/filebot/lib
swing.aatext: true
java.vendor.url: http://java.oracle.com/
user.timezone: 
jna.nounpack: true
os.name: Linux
java.vm.specification.version: 10
sun.net.client.defaultReadTimeout: 60000
sun.java2d.xrender: true
jna.boot.library.path: /usr/share/filebot/lib
sun.java.launcher: SUN_STANDARD
user.country: US
sun.boot.library.path: /usr/share/filebot/jre/lib
sun.java.command: /usr/share/filebot/jar/filebot.jar -script fn:sysenv
jdk.debug: release
useGVFS: true
sun.cpu.endian: little
user.home: /home/rick
user.language: en
java.specification.vendor: Oracle Corporation
java.version.date: 2018-07-17
java.home: /usr/share/filebot/jre
file.separator: /
java.vm.compressedOopsMode: 32-bit
line.separator: 

unixfs: false
useCreationDate: false
java.specification.name: Java Platform API Specification
java.vm.specification.vendor: Oracle Corporation
java.awt.graphicsenv: sun.awt.X11GraphicsEnvironment
application.cache: /home/rick/.filebot/cache
net.filebot.UserFiles.fileChooser: JavaFX
http.agent: FileBot/4.8.2
awt.useSystemAAFontSettings: on
sun.management.compiler: HotSpot 64-Bit Tiered Compilers
java.runtime.version: 10.0.2+13
user.name: rick
sun.net.client.defaultConnectTimeout: 10000
path.separator: :
java.net.useSystemProxies: true
application.help: show
os.version: 4.15.0-43-generic
jna.nosys: true
java.runtime.name: Java(TM) SE Runtime Environment
file.encoding: UTF-8
java.vm.name: Java HotSpot(TM) 64-Bit Server VM
java.vendor.version: 18.3
java.vendor.url.bug: http://bugreport.java.com/bugreport/
java.io.tmpdir: /home/rick/.filebot/tmp
swing.crossplatformlaf: javax.swing.plaf.nimbus.NimbusLookAndFeel
java.version: 10.0.2
user.dir: /home/rick
os.arch: amd64
java.vm.specification.name: Java Virtual Machine Specification
net.filebot.gio.GVFS: /run/user/1000/gvfs
java.awt.printerjob: sun.print.PSPrinterJob
sun.os.patch.level: unknown
application.deployment: deb
java.library.path: /usr/share/filebot/lib
java.vendor: Oracle Corporation
java.vm.info: mixed mode
java.vm.version: 10.0.2+13
jdk.gtk.version: 2
application.dir: /home/rick/.filebot
sun.io.unicode.encoding: UnicodeLittle
org.apache.commons.logging.Log: org.apache.commons.logging.impl.NoOpLog
java.class.version: 54.0


# Arguments #
args[0] = -script
args[1] = fn:sysenv


Done ヾ(@⌒ー⌒@)ノ
rick@LaptopServer:~$ 

I appreciate your assistance with this rednoah.

Thanks!
Rick
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: java.io.FileNotFoundException: $HOME/.filebot/preferences.backup.xml (Permission denied)

Post by rednoah »

Sounds like permissions are screwed up:

Code: Select all

java.io.FileNotFoundException: /home/rick/.filebot/preferences.backup.xml (Permission denied)
Most likely due to running filebot as root, thus initializing all files with root permissions, breaking things for your normal user.


:idea: apt install requires root to install software on the system, but filebot should never be run as anything other than your normal user.


Best to install via the normal package source, so you don't have to download anything manually, and get automatic updates later on:
viewtopic.php?f=11&t=6028




Best to just remove your ~/.filebot folder (and it's bad permissions) altogether:

Code: Select all

sudo rm -rf /home/rick/.filebot
From here on out, just run as normal user, so everything gets created with normal permissions, and then it'll just work. Running FileBot does not require root, and installing a license also does not require root (since it's installed into your user home).


TL;DR

Do NOT do this:

Code: Select all

sudo filebot --license *.psm
Do this instead:

Code: Select all

filebot --license *.psm
:lol:
:idea: Please read the FAQ and How to Request Help.
User avatar
Mustang
Posts: 22
Joined: 07 Aug 2017, 15:50

Re: java.io.FileNotFoundException: $HOME/.filebot/preferences.backup.xml (Permission denied)

Post by Mustang »

Thanks for the quick response. I'll try what you suggested. I'm not sure why filebot would run as root. I've done nothing to allow that to happen, that I know of. I'll report back.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: java.io.FileNotFoundException: $HOME/.filebot/preferences.backup.xml (Permission denied)

Post by rednoah »

sudo means "do as superuser / root" so presumably by calling sudo filebot ... the first time around, ~/.filebot and files inside have been created with superuser / root permissions, which means your normal user doesn't have access to them, which causes filebot to crash right away when running as normal user, because it needs access to it's application data folder to run correctly.
:idea: Please read the FAQ and How to Request Help.
User avatar
Mustang
Posts: 22
Joined: 07 Aug 2017, 15:50

Re: java.io.FileNotFoundException: $HOME/.filebot/preferences.backup.xml (Permission denied)

Post by Mustang »

rednoah wrote: 12 Jan 2019, 11:02 sudo means "do as superuser / root" so presumably by calling sudo filebot ... the first time around, ~/.filebot and files inside have been created with superuser / root permissions, which means your normal user doesn't have access to them, which causes filebot to crash right away when running as normal user, because it needs access to it's application data folder to run correctly.
Ah, ok, so it wasn't that I was running filebot as admin all along, it was because I was stupid and ran "sudo filebot --license *psm". I thought I found that in the filebot forums somewhere so I did it that way.

I just deleted the .filebot folder and reinstalled using the link you provided. It works like a champ now. No problems.

I've been donating for years and recently purchased a lifetime license. But, I promise you that I'm not done donating. I appreciate hard work and great customer service. Thanks rednoah!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: java.io.FileNotFoundException: $HOME/.filebot/preferences.backup.xml (Permission denied)

Post by rednoah »

No worries. If you went all-in with the rather expensive life-time license, then I can only say much appreciated, and you certainly have done your part in supporting my work. Kudos!

PS: If you find any forum links with people calling sudo filebot, please send me a link so I can correct or delete them. :lol:
:idea: Please read the FAQ and How to Request Help.
Post Reply