Ubuntu snapd vs deb package

Support for Ubuntu and other Desktop Linux distributions
Post Reply
dirtycajunrice
Posts: 6
Joined: 20 May 2016, 16:20

Ubuntu snapd vs deb package

Post by dirtycajunrice »

Preface for attention: I just donated another €10 because getting on the forum reminds me to do so :P

I have used FileBot for a very long time and finally decided to try migrating from the deb package on SF to the snap package. With both the deb and the snap package on 4.7.9 ALL files give the same error: Illegal Argument: java.nio.file.NoSuchFileException using the snap package. It works flawlessly with the deb package.

My first thought is that it is not using the java built into the package but the java compiled on my system, but if that were a problem the deb package wouldn't work either.

Example simple CLI quoted request:

Code: Select all

filebot -mediainfo --db TheMovieDB "/dir/pre-moved/She's Out of My League 2010 1080p BluRay DTS-HD MA 5.1 x264-BluEvo/She's Out of My League 2010 1080p BluRay DTS-HD MA 5.1 x264-BluEvo.mkv"
Example simple CLI escaped request:

Code: Select all

filebot -mediainfo --db TheMovieDB /dir/pre-moved/She\'s\ Out\ of\ My\ League\ 2010\ 1080p\ BluRay\ DTS-HD\ MA\ 5.1\ x264/She\'s\ Out\ of\ My\ League\ 2010\ 1080p\ BluRay\ DTS-HD\ MA\ 5.1\ x264.mkv"
Both (with the snap package) return the same error:

Code: Select all

Illegal Argument: java.nio.file.NoSuchFileException: /dir/pre-moved/She's Out of My League 2010 1080p BluRay DTS-HD MA 5.1 x264/She's Out of My League 2010 1080p BluRay DTS-HD MA 5.1 x264.mkv (/dir/pre-moved/She's Out of My League 2010 1080p BluRay DTS-HD MA 5.1 x264/She's Out of My League 2010 1080p BluRay DTS-HD MA 5.1 x264.mkv)
Is there something I am missing?

Thanks,
DirtyCajunRice
dirtycajunrice
Posts: 6
Joined: 20 May 2016, 16:20

Re: Ubuntu snapd vs deb package

Post by dirtycajunrice »

More, possibly relevant, information:

fn:sysinfo

deb

Code: Select all

FileBot 4.7.9 (r4984)
JNA Native: 5.1.0
MediaInfo: 0.7.93
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-05-15 (r500)
Groovy: 2.4.10
JRE: Java(TM) SE Runtime Environment 1.8.0_131
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 8 Core / 3 GB Max Memory / 24 MB Used Memory
OS: Linux (amd64)
Package: DEB
uname: Linux MEDIA 4.8.0-53-generic #56~16.04.1-Ubuntu SMP Tue May 16 01:18:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
snap

Code: Select all

FileBot 4.7.9 (r4986)
JNA Native: 5.1.0
MediaInfo: 0.7.82
7-Zip-JBinding: 9.20
Jun 12, 2017 12:37:58 AM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Chromaprint: 1.2.0
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-05-15 (r500)
Groovy: 2.4.10
JRE: OpenJDK Runtime Environment 1.8.0_121
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 8 Core / 3 GB Max Memory / 43 MB Used Memory
OS: Linux (amd64)
Package: SNAP
uname: Linux MEDIA 4.8.0-53-generic #56~16.04.1-Ubuntu SMP Tue May 16 01:18:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Ubuntu snapd vs deb package

Post by rednoah »

snap packages run in a sandboxed environment and are not allowed to access system folders such as /dir. This problem can be solved by installing the snap package in --devmode which disables filesystem security (not recommend) or by using standard locations for files and shares (i.e. your home folder, the GVFS folder, etc) for which access is granted by default.
:idea: Please read the FAQ and How to Request Help.
dirtycajunrice
Posts: 6
Joined: 20 May 2016, 16:20

Re: Ubuntu snapd vs deb package

Post by dirtycajunrice »

/dir is not a system folder in Linux. I explicitly created that folder out of habit. On that note, though I assume the only way it can tell is by folder/file permissions. Are you privy to the required umask for a file/folder to be accessible from a snap package?

Thanks,
DirtyCajunRice
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Ubuntu snapd vs deb package

Post by rednoah »

Any folder in / is a system folder. snapd sandboxing works with SELinux / AppArmor which isolates access regardless and independent of traditional filesystem permissions. I'm not sure if it's even possible to whitelist folders such as /dir. You'd have to ask the snapd developers.

@see https://github.com/snapcore/snapd/wiki/ ... nvironment
:idea: Please read the FAQ and How to Request Help.
sidcypher
Posts: 8
Joined: 22 Mar 2015, 17:55

Re: Ubuntu snapd vs deb package

Post by sidcypher »

Running into the same problem using the snap, as my system has died once more and I am rebuilding..

my dlna server is hosting out of /mnt/500g/media/tv

would this be resolved by mounting that hdd in /media or /~
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Ubuntu snapd vs deb package

Post by rednoah »

Probably, but you won't know for sure unless you just try it. ;)

@see viewtopic.php?f=11&t=5139
:idea: Please read the FAQ and How to Request Help.
Post Reply