I need ordinary users to be able to mount /dev/loop0p1 and /dev/loop0p2 on my machine. /dev/loop0p1 is always going to be a FAT32 partition and loop0p2 - a ext3.
To that end, I have:
1) created directories /tmp/loop0p1 and /tmp/loop0p2 (in startup script, I know those disappear after reboot):
[root@machine tmp]$ ls -l
(...)
drwxrwxrwx 2 root root 80 Jul 22 00:25 loop0p1
drwxrwxrwx 2 root root 40 Jul 22 00:50 loop0p2
2) added the following lines to /etc/fstab:
/dev/loop0p1 /tmp/loop0p1 vfat defaults,loop,users,noauto 0 0
/dev/loop0p2 /tmp/loop0p2 ext3 defaults,loop,users,noauto 0 0
3) Now as an ordinary user I am able to mount them , no problem.
Problem is with permissions of the loop0p2 Ext3 partition - before the mount, as you can see above, the /tmp/loop0p2 mountpoint is has permissions '777', but after the 'mount /dev/loop0p2', thos suddenly magically change to '755':
[root@machine tmp]$ ls -l /tmp
(...)
drwxrwxrwx 2 user user 16384 Jan 1 1970 loop0p1
drwxr-xr-x 3 root root 1024 Jul 22 00:37 loop0p2
and, needless to say, my user cannot write anything inside the /tmp/loop0p2 mountpoint, which is useless.
Why do the permissions change and is there a ext3 mount option which would give me full access? gid, uid, umask all seem unsupported by this damn ext3!!