You are not logged in.
Pages: 1
I have an external USB drive with multiple partitions, one of which is VFAT. The partitions are mounted automatically when I plug it in to /media/disk-*. Before plugging the drive in, I ensured that those folders exist and are owned by my user prior to mounting.
drwxr-xr-x 2 b-con users 4096 2007-12-23 19:35 disk-1
drwxr-xr-x 2 b-con users 4096 2007-12-23 19:35 disk-2
If I then just plug the external drive in, the partitions will be mounted automatically and I have write access to the VFAT partition. However, if I mount the VFAT partition manually, the folder gets re-owned by root and I can only write to the disk as root.
How do I manually mount a VFAT partition such that it isn't owned by root, *without* rebooting? What is it that udev (I assume udev is doing the auto-mounting(?)) is doing that I need to?
Last edited by B-Con (2007-12-24 03:57:27)
Offline
Unless you specifically told udev to automount, it wont do it. I would assume that hal and dbus are doing automounting.
As for not getting reowned by root, try passing the -o user options to mount. The users group should own it. AFAIK.
Offline
I tried -o users, the mount point still got owned by root and I can't write to it unless I escalate to root.
Offline
I haven't done this in a while, so I could be wrong, but I think pmount is the program you are looking for. It's a package in extra.
HTH
Jack
Offline
In:
/etc/fstab
/dev/sda3 /mnt/sda3 vfat users,uid=1000,gid=100 0 0
Use your own uid and gid
Offline
@B-Con
Like you I like to mount my USB external drive, so this is what I have done. And it works:
# USB ports (front)
/dev/sdc1 /mnt/usbhd vfat rw,user,noauto 0 0
Notice that I use noauto to avoid auto mounting the USB and also user so it mounts owned by me with rw (read/write) permissions.
Note: /dev/sdc1 is how my system recognizes my USB, to find out how your's reads it just issue "dmesg" at a console after you plug in the USB and you will get the info.
Hope this helps.
Last edited by ralvez (2007-12-24 17:37:18)
Offline
Ah, right... I can edit /etc/fstab and then mount the system and it will be mounted with the fstab entry, no rebooting necessary.
Bleh, I wasn't thinking clearly tonight. I didn't want to have to edit /etc/fstab so I was trying to pass the options via -o to mount. So I was issuing commands like:
sudo mount /dev/sdb8 /media/disk-1 -o rw,user
which would mount it, but own it by root. That confused me for a while, until I woke up and realized that the user doing the mounting *was* root, given that I was using sudo and all...
Thanks guys.
Offline
Pages: 1