Allow a filesystem in Ubuntu to be mounted by users
November 8, 2008 8:29 AM
Subscribe
How do you create a user-mountable filesystem in Ubuntu Eee 8.04.1?
I have an Asus Eee PC 4G laptop running Ubuntu Eee 8.04.1 as its operating system, which is a customized distro of Ubuntu 8.04 made for the Eee PC. Since I bought a new MacBook recently, I'm currently setting up this computer to be used as a small home file (Samba), print (CUPS), and Web (Apache) server.
An SD card is in the computer's card slot and an external hard drive is connected via USB. Both have a VFAT filesystem. I want both those filesystems to be writable, mountable, and unmountable by all users in the computer (not just by root or the user who mounts them).
The filesystem on the SD card is labelled "SDCARD" and the one on the HDD is labelled "HARDDISK". I already created empty directories in /mnt, both with mode 777, and modified the /etc/fstab file to have the following:
LABEL=SDCARD /mnt/sdc auto users,auto,exec,rw,umask=111,dmask=000 0 0
LABEL=HARDDISK /mnt/hdd auto users,auto,exec,rw,umask=111,dmask=000 0 0
I tried both the "user" and "users" option in the fstab file, but every time I try to mount one of the filesystems mentioned above using a regular user, I get the following message:
mount: must be superuser to use mount
It works fine when I mount using the "sudo" command or the "root" account. Note that I can't simply use symlinks to point to the filesystems in /media, since I need to override the mount options to allow all users to write on the filesystems. I also think modifying udev options just for this may be overkill and time-consuming.
Besides, with the "user" or "users" in the fstab, why can't I still mount using a normal user? Can anyone help me with this?
Thanks in advance!
posted by remi to computers & internet (9 comments total)
pmount, which makes the device user-mountable by default. You'll need to be part of the plugdev group, but it's a lot simpler than mucking about in fstab. The man pages for this are pretty readable.posted by spaceman_spiff at 8:34 AM on November 8, 2008