Home directories listed in /etc/passwd should be honoured
Bug #1607710 reported by
Dan Watkins
This bug report is a duplicate of:
Bug #1594904: Snaps fail to run when user's home directory is not under /home.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snappy |
New
|
Undecided
|
Unassigned | ||
snapd (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I'm trying to use a snap as part of a Jenkins job. Jenkins runs its jobs in /var/lib/
$ grep jenkins /etc/passwd
jenkins:
However, I get the following error message:
cannot remain in /var/lib/jenkins, please run this snap from another location. errmsg: No such file or directory
summary: |
- Use passwd to determine user home directory + Home directories listed in /etc/passwd should be honoured by home + interface |
tags: | added: cpc |
To post a comment you must log in.
This is more than just the home interface-- we have AppArmor rules that use the @{HOME} variable in the default template and the launcher/snap-run sets up various environment variables (including HOME).
It would be easy enough for the launcher/snap-run run to determine the home directory of the user and set the env vars appropriately. You can adjust what @{HOME} expands to with AppArmor policy by dropping files in /etc/apparmor. d/tunables/ home.d as well. The trick would be keeping /etc/apparmor. d/tunables/ home.d up to date for new users that are added after snaps are run. Any options would include snapd managing /etc/apparmor. d/tunables/ home.d/ snap.* files in some manner, and when changed, regenerate all the security policy.