2
/etc/fstab
UUID=<someuuid> /mnt/data ext4 defaults,relatime,data=ordered   0 2

and

/mnt$ ll
drwxr-xr-x 2 manuel users 4096 15. Apr 18:25 data
/mnt$ mount -a
/mnt$ ll
drwxr-xr-x 4 root root 4096 14. Apr 22:54 data
/mnt$ 

I don't get it. What is the problem with this? I want to have write permissions in /mnt/data. In subfolders I can write. It is just in this rootfolder. Why does the owner of the folder change?

1 Answer 1

4

It seems that (whyever) in the first situation the volume is not mounted. You see the mount point i.e. the folder in the underlying file system. IMHO normal mount point folders should always belong to root:root and have 000 access rights as it does not make any sense to use them in a typical situation.

Mounting the volume replaces the mount point folder by the root directory of the mounted file system. Obviously this can have different access rights and owner. You need to change ownership of the folder after the volume has been mounted. This information is written to the mounted file system. Each time you mount it, these new values will appear at the mount point.

And my advice is to change the metadata of the mount point folder (when not mounted), too.

1
  • 1
    "You need to change ownership of the folder after the volume has been mounted." Thats the deal nobody mentions... Apr 15, 2013 at 17:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .