I'm trying to figure how to mount an ext4 formatted external HD with permissions for a specific user using autofs, but I'm only able to mount it as owned by root. I have read that ext4 mount points use the filesystem information to determine permissions so I have tried 2 things:

  1. Configure autofs to mount the partition under a directory owned by the target user
  2. Write a udev rule to set the owner of the device

I know there's the option of running bindfs, but I'd like to understand how does mount handle filesystem permissions when mounting an ext4 formatted device.

  • I don't see why this is being voted for closure. It's a fair question with a sufficiently good answer to be useful for future readers. – roaima Sep 12 '17 at 22:21

Ok...so I had not tried the one thing that was missing: setting the ownership in the mounted device.

After manually mounting the device to /mnt/hdd and running

sudo chown myuser:myuser /mnt/hdd

When I start autofs and access the desired mountpoint it gets mounted with the right permissions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.