Force classic mode on snap install

Hello,

I have a network share mounted through cifs on fstab and most of the snaps I install are not able to write on these mounts… Is there any way to override this setting without losing all confinement? Well if I have to lose it I guess that’s fine too…

Cheers

Hello

Can you please give us more information about the setup you have. I believe that the line describing cifs would be sufficient. I will try to add support for this use case for snapd 2.39 if possible.

For example, I install subliminal-subtitles

snap install subliminal-subtitles

I have my fstab like this:

//192.168.1.***/Public /media/nas-public cifs _netdev,uid=*****,gid=*****,iocharset=utf8,file_mode=0660,dir_mode=0770,username=*****,password=***** 0 0

When I try something like:

subliminal-subtitles download -v --language pt some-movie.mkv

I get the error
Traceback (most recent call last):
File “/snap/subliminal-subtitles/22/bin/subliminal”, line 11, in
load_entry_point(‘subliminal==2.0.5’, ‘console_scripts’, ‘subliminal’)()
File “/snap/subliminal-subtitles/22/lib/python3.6/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/snap/subliminal-subtitles/22/lib/python3.6/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/snap/subliminal-subtitles/22/lib/python3.6/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/snap/subliminal-subtitles/22/lib/python3.6/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/snap/subliminal-subtitles/22/lib/python3.6/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/snap/subliminal-subtitles/22/lib/python3.6/site-packages/click/decorators.py”, line 27, in new_func
return f(get_current_context().obj, *args, **kwargs)
File “/snap/subliminal-subtitles/22/lib/python3.6/site-packages/subliminal/cli.py”, line 326, in download
video.subtitle_languages |= set(search_external_subtitles(video.name, directory=directory).values())
File “/snap/subliminal-subtitles/22/lib/python3.6/site-packages/subliminal/core.py”, line 339, in search_external_subtitles
for p in os.listdir(directory or dirpath):
PermissionError: [Errno 13] Permission denied: ‘.’

This kind of error happens to almost any snap that tries to write on a remotely mounted share.

1 Like

do you have the removable-media interface of sublimal-subtitles connected ?

sudo snap connect subliminal-subtitles:removable-media

if your user normally has permissions to write to /media/nas-public and the interface is connected, the app should theoretically work. from a toplevel view it should really not make a difference if the /media/nas-public dir is using a network filesystem or is a locally mounted filesystem as long as the above is true.

Hello @brunorene,

I have the same problem here.
Snap is installed.
I installed cloudcompare and visualsfm.

My homedir is mounted to a CIFS share on the network.

I have the same error in the two applications:

Cannont create user data directory /mount-point/myaccount/snap Read-Only file system

Even if I can create a directory if i use the command:
mkdir /mount-point/myaccount/snap/myapplication/test with no error.

If i create a local user with a local directory i can open the application

home dirs are completely different from removable devices (from a snap POV at least), here is a bug about it:

1 Like

Thank you @ogra, i add my error in the launchpad bug tracker thanks.