Incorrect Downloads directory for LDAP user in snapped firefox & chromium
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned | ||
snapd |
New
|
Undecided
|
Unassigned | ||
chromium (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
firefox (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
snapd (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Test procedure:
1. Log in to Gnome as a Active Directory user.
2. Launch browser (firefox or chrome) - make sure there's no existing config (we are interested in the default Downloads location).
3. Download a file via the browser.
4. Check where it was downloaded.
Expected result:
The files are downloaded to ~/Downloads (or a translated equivalent).
Actual result:
The files are downloaded to:
~/snap/
~/snap/
For local users the behavior is as expected (all files are downloaded to ~/Downloads).
This is very inconvenient for enterprise environments where manual setting modification is needed on every host.
This has been tested on 22.04 with the following versions:
- firefox (116.0.3 Mozilla Firefox Snap for Ubuntu canonical-002 - 1.0)
- chromium (Version 116.0.5845.110 (Official Build) snap (64-bit))
- snapd 2.58+22.04.1
I have been looking into this issue and I've noticed that in snap/command- chain/desktop- launch line 39 cases the issue:
REALHOME=$(getent passwd $UID | cut -d ':' -f 6)
Inside the snap getent passwd $UID returns an empty string for the AD/LDAP user.