Here is what is observed:
sharad@nt535:~$ ls -l /mnt total 12 drwxr-xr-x 2 sharad sharad 4096 2012-01-17 17:14 MyPicsAndVids drwxr-xr-x 2 sharad sharad 4096 2012-01-17 17:14 SharadHomeDir sharad@nt535:~$ sudo mount /dev/dataVG/SharadHomeDir /mnt/SharadHomeDir sharad@nt535:~$ sudo mount /dev/dataVG/MyPicsAndVids /mnt/MyPicsAndVids sharad@nt535:~$ ls -l /mnt total 12 drwxrwx--- 4 root root 4096 2012-01-16 22:37 MyPicsAndVids drwxrwx--- 4 root root 4096 2012-01-17 17:21 SharadHomeDir
I want to mount these as normal user. Thus, after mounting, I want the following owner /group:
sharad@nt535:~$ ls -l /mnt total 12 drwxr-xr-x 2 sharad sharad 4096 2012-01-17 17:14 MyPicsAndVids drwxr-xr-x 2 sharad sharad 4096 2012-01-17 17:14 SharadHomeDir
I actually want to do this via fstab. I've tried various mount options, such as user and providing uid and gid options, but none seem to work.
Now, I've searched and found this solution: How do I manually mount a linux file system read/write as a normal user? But, I want it automatically mounted at bootup using fstab only, without going through a secondary step such as bindfs. I was wondering if I could change the owner of the LVM volume perhaps?
According to the link above: On an ext4 filesystem (like ext2, ext3, and most other unix-originating filesystems), the effective file permissions don't depend on who mounted the filesystem or on mount options, only on the metadata stored within the filesystem.
Can I change some information in this metadata such that it mounts as normal user and not root user?