Non-root write access to a USB drive (ext2) ??
I've googled around for some hours and I can't find a straight answer to this question...maybe there isnt' one!
I want to use my USB external drive as backup storage, so I need write permission as non-root. The filesystem is ext2, and my fstab file states the typical line:
/dev/sda1 /media/usbdisk auto pamconsole,exec,noauto,fscontext=system_u: object_r:removable_t,managed 0 0
I have read permissions to the drive as non-root, but can't write. Any ideas will be much remuch appreciated.
(Fedora Core 3)
Try to add this option: users
I did but it did not work :( . The line now reads as
/dev/sda1 /media/usbdisk auto pamconsole,users,exec,noauto,fscontext=system_u :object_r:removable_t,managed 0 0
When I issued mount /media/usbdisk I looked into /etc/mtab file and got the line
/dev/sda1 /media/usbdisk ext3 rw,nosuid,nodev,fscontext=system_u:object_r:removable_t,user=jmborr 0 0
so according to /etc/mtab, I (jmborr) has write access (rw). However, when I cd to /media/usbdisk and touch junk I got:
touch: cannot touch `junk': Permission denied.
By the way, after mounting /media/usbdisk, the directory still belongs to root:
drwxr-xr-x 4 root root 4096 Oct 16 21:09 usbdisk
Shouldn't the ownership have changed to "jmborr" ? jose:scratch:
I found two quick and dirty ways to gain write access:
One, after mounting as single user, switch to root and change access bits to /media/usbdisk (chmod go+w usbdisk)
Two, chown jmborr:jmborr usbdisk
But these have nothing to do with the mounting process, and one needs root access :tisk:.
Add a gid and umask to the fstab line.
The above options will make it root:users with permissions of 775
|All times are GMT -5. The time now is 01:44 AM.|