You are not logged in.
I often deal with raw disk images mounted via loop devices. Recently, I found out that they can be managed without root privileges using udisks. For testing purposes, I created created and formatted an image like so:
dd if=/dev/urandom of=img.img bs=1M count=16
mkfs.ext4 img.imgThen I now mount it using udisks
udisksctl loop-setup -f img.imgThis works fine so far. The device shows up in any file manager, I can access via its mountpoint in /run, just like any local hard drive managed by udisks,. Only the permissions are not what I expected.
ls -l /run/media/$USER/
drwxr-xr-x 3 root root 1024 Apr 10 11:19 [some id]
drwx------ 1 auser auser 12288 Oct 30 2012 [a device label]The first one listed is the loop device, owned by root and not writable by anybody else. The second one is a local hard drive or an USB pen device, belonging to the user who mounted it. I know that I could fix this with a simple chmod executed as root. But why does udisks assign different permissions and owners? Can it be configured to do otherwise?
Last edited by XZS (2014-04-13 21:33:07)
Offline