udisks does not fix or inform user about bad permissions on /media/<username> directory after uid change
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
udisks2 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I am using a just updated copy of 14.04. The version of the udisks2 package is 2.1.3-1.
I changed the UID of a user on my system from 1001 to something else. After the change, the ACL permissions on /media/<username> still reflected the old UID. After I deleted the directory and inserted a usb thumbdrive, the directory was recreated with the correct acl permissions.
ACLs after UID change but before removing the directory:
$ getfacl /media/rat
getfacl: Removing leading '/' from absolute path names
# file: media/rat
# owner: root
# group: root
user::rwx
user:1001:r-x
group::---
mask::r-x
other::---
After removing the dir, inserting a thumb drive, and then removing the thumb drive:
$ getfacl /media/rat
getfacl: Removing leading '/' from absolute path names
# file: media/rat
# owner: root
# group: root
user::rwx
user:rat:r-x
group::---
mask::r-x
other::---
Since udisks controls the /media directory, shouldn't it just verify and update the permissions of the directory?
No, it shouldn't. It generally isn't a good idea to change uids in the first place, and certainly not while logged in. If you do, then the change does not take affect until you log out and back in anyhow, and any permissions in the filesystem will not be updated unless you update them.