Tuesday, November 22, 2011

Tips: 4 How to allow user to mount the drives ?

By default, Linux does not allow users to mount drives. Only root can do it, and making the mount binary suid root is not a good idea. With a special command in the /etc/fstab file, you can change that.

This is a typical line for the fd0 (A:) drive in /etc/fstab:

/dev/fd0 /mnt auto noauto,user 1 1

The keywords here are noauto and user. Noauto tells mount not the try to mount a diskette on boot, and user allows any user to mount the drive into /mnt. The auto keyword is also interesting. It tells mount to try to find out which file system is on the diskette.

No comments:

Post a Comment