I'd like to mount an ext3 filesystem via /etc/fstab so that the files in the mount are owned by a particular user. Is this possible ? I've looked at man mount but couldn't find an option to do this. ( Similar to setting uid and gid for a vfat mount ).

Is there any option besides doing running chown on the whole mounted filesystem ?

link|improve this question
feedback

2 Answers

up vote 1 down vote accepted

No, this isn't possible to do in fstab or mount with ext3 because the ownership info is stored within the file system, as opposed to being a property of the file system. Run chown -R.

link|improve this answer
feedback

There's a patch around for mounting ext2/3 with a fixed uid for all files, I couldn't figure out if it has made it into the kernel yet, but if it has it's in 2.6.31+ .

The option is anyway uid=userid, as in e.g. mount -o uid=500 /dev/sda1 /mnt/mydisk

It'll certainly be handy if you have removable drives formatted as ext3, moving it back& forth between machines where your have a different user id.

link|improve this answer
Thanks, I'll have a look. I wanted this for the same reason you mentioned. – nagul Aug 2 '09 at 7:50
feedback

Your Answer

 
or
required, but never shown

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