File access from Jolla store File Browser in SFOS (4+) respects SailJail limits

I have recently changed from an Xperia X SFOS 3.4.0.24 to a Xperia 10 III SFOS 5.0.0.67

I have always used sshfs to copy file to and from my phone and it worked a charm. With the SFOS 5.0.0.67 I see an issue that seems to be applicable to many, not all apps.

What I tried is this:
under /home/defaultuser I created a directory first using sshfs, later using the terminal app (mkdir).
The directory is created on the file system and I can copy content to the directory. The contents remains here as expected.

When I open the File browser app, the new directories are not shown. Similar to some other apps like Tailfish or ScummVM.
Yet other apps like Sailfish Connect or ownKeypass can see the directories created.

What am I missing? Is this a bug? Is this some strange ideology?

One more thing. I tried to create a directory using the File browser under /home/defaultuser. This is really odd, the directory seems to be created, it is shown for a short while but does not appear when doing an ls in the terminal. It rather disappears from the File browser app after a short time (1 minute or so).

Any ideas out there how to fix this? I mean how do I get full file access from all apps again?

Thank you for your thoughts.

You are seeing the effects of app sandboxing called SailJail.

All of this is by design and on purpose.

It certainly is confusing at first, but once you understand how it works it will start to make more sense.

6 Likes

If you use nanofiles it should work great

1 Like

As nephros said, it’s a feature, not a bug.

You can disable it for file browser by editing /usr/share/applications/harbour-file-browser.desktop

and make the last paragraph look like this:

[X-Sailjail]
#Permissions=Audio;MediaIndexing;RemovableMedia;UserDirs;PublicDir
#OrganizationName=harbour-file-browser
#ApplicationName=harbour-file-browser
Sandboxing=Disabled
3 Likes

Hi, thank you for the replies.

@nephros This explanation is useful, but it continues the red line through my Jolla/Sailfish OS experience. Every update breaks an essential feature of the SFOS.
First thing I tried to copy my stuff to the microSD card and that worked. I could access my file, which is all I care about. This workaround makes this ā€˜feature’ a hypocritical bug in search of security. I want to point out that that: ā€œIf you exchange your freedom for temporary security you gonna loose both.ā€ free quote of the founds of the US.

@Mister_Magister Thank you, but this is not a solving the issue for the apps that I care about. I mean apps like Unplayer, Tailfish, and other media players.

@ohnonot This seems to have the desired effect, just annoying the it has to be done for all relevant apps.

Further question: How do people copy their media to their SFOS phone, through the USB-Age? that would be so retro.
Any method that works in the wireless-age?

Thank you.

It seems you are not understanding what the point is here.
SailJail is not about locking apps out from files you place on the phone - it’s about locking out apps from system files, dotfiles, config files, other apps’ files and so on and so forth. Things they have no business having access to. Just place your media where it is supposed to be located, and all will work fine.

SCP.
You not knowing this makes it even more certain you don’t know your way around a Linux system - which is fine, but then moderate your criticism accordingly.

2 Likes

You approach and sshfs/sftp is the best way. Only change you have to do is to create a new directory under a directory with privileges instead of /home/defaultuser, i.e. under /home/defaultuser/Music for Unplayer, Tailfish and other media players.
Other directories with privileges are ~/Documents or ~/Downloads.

solution is to make jolla remove stupid sailjail

1 Like

sftp via dolphin via wifi. You can’t beat that

In ~/Videos/ I made a link to /run/media/defaultuser , and whole video content of the SD card will be visible in Gallery app / Videos and also LLs vPlayer.

The symlink seems incidental to this result.
I have a video on the root of my SD card - and it shows up in gallery just fine.

It’s also not like a softlink will circumvent the jailing…

1 Like

I get some of the point, and all can be made to work with workarounds.

But let me comment that my home is my castle and my home directory is my data. Being told how to organize myself within is my problem and nobodies business.

To me it sounds sounds like a programmers implementation issue and I strongly suggest that sandboxing respects my home directory as my data. I mean ā€˜if you do things right, people won’t know you have done anything at all’ - Futurama.

I guess this concludes my original questions. Thank you all!

1 Like

@Mister_Magister

that is eactly that!!!
the way Linux handles the permissions, that dates back to the beginning of Unix (quite a few decade ago), should be enough
introduction of SailJail was the first of a few SFOS step back a few years ago
there should be a way to remove it for all apps at once in an easy Settings option (or menu)

1 Like

This seems to work for any app: just modify the relevant /usr/share/applications/<app_specific_file>.desktop

and add or modify the section

[X-Sailjail]
Sandboxing=Disabled

at the end of the file.

Yes that works for other apps, too, and it’s very easy to do. I did it for some old apps that still have SailJail not implemented but I want to use.
For the rest I have no problems with SailJail, but in general I agree, it makes things more complex as necessary. IMHO Jolla should make SailJail optional.

That works, but app updates will overwrite your modifications.
It’s better to copy/create a file of the same name at /etc/sailjail/applications/ and do the modifications there.

4 Likes

Should this file
/etc/sailjail/applications/harbour-file-browser.desktop
then contain only

[X-Sailjail]
Sandboxing=Disabled

or the whole stuff from
/usr/share/applications/harbour-file-browser.desktop?

Regarding File Browser: the correct answer is to install the app from Storeman/OpenRepos, as stated in the app’s store page. Get it from here: File Browser | OpenRepos.net — Community Repository System I’m always uploading a jailed version to the official store, and a version without Sailjail to OpenRepos. You don’t have to edit anything manually.

5 Likes

Thanks very much @ichthyosaurus , edit: and many thanks for the update!

With my question i refer to @cyberhippy 's question , and want to learn generally how controlling Sailjail works.

I like your app very much! Thank you! I have installed from Storeman.
But one thing would interest me: why isn’t your wonderful app available on Chum?

1 Like

Doesn’t really matter, AFAIK only the Sailjail part is considered though.

2 Likes