Is it mine?

I’ve noticed that:

/run/media/<user_name>/

is owned by root. Is that correct?

1 Like

It seems so!


$ ls -al /run/media
total 0
drwxr-xr-x   3 root root  60 Jul  7 13:18 .
drwxr-xr-x  31 root root 680 Jul  7 10:11 ..
drwxr-x---+  3 root root  60 Jul  7 13:18 pebcak

Edit:

On the other hand, the mount point for the device mounted under /run/media/pebcak is owned by my user:

ls -al /run/media/pebcak 
total 8
drwxr-x---+  3 root   root     60 Jul  7 13:18 .
drwxr-xr-x   3 root   root     60 Jul  7 13:18 ..
drwxr-xr-x  54 pebcak pebcak 8192 Jan  1  1970 SONY16GB

This is a FAT32 USB flashdrive.

If I am not mistaken, if you mount a device, let’s say an EXT4 partition previously created as root (with Gparted or via command line), then the mountpoint will be owned by root as well. So you would need to change the ownership of the mounpoint in order to have rw access to that device.

2 Likes

Thanks @pebcak

If I am not mistaken ...

Exactly! That’s what i was thinking. Whereas, if the “top” dir was owned by the user then new stuff would already be owned by them thus saving effort for lazy folk such as me.

Still, it is how it is … at least for now :wink:

Thanks again @pebcak

1 Like

If you use more descriptive titles it might be much more helpful for users of the forum who are searching for similar issues.

2 Likes