Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 ?

share|improve this question

2 Answers 2

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.

share|improve this answer

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.

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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