Installing snaps without admin access

Hi all,
I study and work in Aalto University, Finland. Every student here has a personal account from which it is possible to access to computers all around the campus. Many of them run on Ubuntu, and I use these daily.

Unfortunately we don’t have administrator access, we can only use user space. So I managed to install PyCharm and Telegram using their standalone, user space, installer.

However I cannot install any snap, because they install software on a system level and hence need admin privileges. In fact, I could not do the same for Slack, because I only found it packaged as deb, rpm or snap.

It would be very handy if there was some option to install snaps in user level without admin privileges. I think this kind of scenarios can be quite common in work environments, schools and universities. This would have the advantage of letting user install the applications they want without requiring system administrators to deal with more security concerns.

Fabio

3 Likes

For comparison, the flatpak format allows this, but I didn’t try it myself yet: flatpak link.

flatpak is a delivery mechanism for graphical/desktop apps only while snap is a fully fledged packaging format … as such, snaps allow you to install server apps, bundles of system apps, commandline apps and even kernels and bootloaders (there are even systems that are “snap only” from the ground up (see Ubuntu Core)) … this different feature set and scope between the two makes such a per-user function a rather big thing to implement on the snap side. it is surely possible to have such a function one day but making this work means a lot of non-trivial design changes in the functionality and code, it is sadly not supported today with snap packages …

did you talk to your sysadmins about having them install the snaps for you though ? the enhanced security features through confinement and safe update/rollback features should actually be pretty compelling for them :wink:

Hi ogra :blush:

Yes, we can ask our sysadmins to install specific applications, but what I wanted was actually the flexibility to not have to ask every time and be the only one responsible for my own environment.

About the comparison with flatpak, I realize now that there are some major differences.

By the way, would it be more easily achievable to only have the user space installation being available only for desktop apps and their runtimes?

In this way, the sysadmins could take care of installing some relevant base packages, like the core snap, but leaving the users the possibility to install desktop apps. In this way the scope of the modifications would be much more limited, I hope. After all, in these scenarios I suppose desktop apps cover the most part of the snaps desirable by a user.

If your admins actually trust you enough to allow you to install snap packages systemwide, they can manage that through the “wheel” group (if they dont want to have you as general admin via the àdmin or sudo groups) on the system, you would then have to use snap login <your SSO email> and would be able to install snaps system wide.

$ snap login --help
Usage:
  snap [OPTIONS] login [<email>]

The login command authenticates on snapd and the snap store and saves credentials
into the ~/.snap/auth.json file. Further communication with snapd will then be made
using those credentials.

Login only works for local users in the sudo, admin or wheel groups.

An account can be setup at https://login.ubuntu.com

Application Options:
      --version      Print the version and exit

Help Options:
  -h, --help         Show this help message

[login command arguments]
  <email>:           The login.ubuntu.com email to login as

Note though that this means you could also install server and commandline applications etc …

Thanks, that’s a good workaround, but I don’t think it fits their policies. Hoping to see this coming, one day :blush: