Small question concerning mount
Just noticed that the mount binary isin /bin, i always thought anything in this dir was free for all (if you know what I mean, like any user of the system can use the bin). So anyhow I tried mounting a floppy to a users home dir, turns out that only root could do it..
Just wondering what's the deal with it, I mean it makes sense that only the root can mount.. but why isn't it simply located in /sbin or /usr/sbin ? |
well if you add the user option to the floppy device line in fstab then users can mount a floppy ;)
|
ahh ok that makes sense.. just read a little through the man pages of fstab...
where exactly do i add this? Code:
/dev/fd0 /floppy auto rw,user,noauto 0 0 Code:
/dev/fd0 /floppy auto rw,user,noauto,colabus 0 0 |
right place, wrong word. you add the actual word "users"
Code:
/dev/fd0 /mnt/fd0 auto noauto,nosuid,rw,users 0 0 |
yes but i had this originally and it read that only root could mount..
|
"users" not "user"
|
ahh my mistake, ok I adjusted that. Now is there a way to refresh the mounts or is that only possible through a reboot?
btw thanks for the prompt help :) |
shoudnt need to, it should take effect as soon as you save
|
Just to make it clear, the mount program itself is in /usr/bin because it's meant to be available to everyone (Of course, that also depends on the permissions the administrator has put on it; he could decide to make it available to certain users only). But while the program itself does the actual work, who is allowed to do so is determined elsewhere.
The action of mounting is dependent on the configuration set up in the /etc/fstab file. fstab tells the computer who can mount a device, where it gets mounted, and what other options are available when mounted. By default it's set for root only, but with a simple modification, mentioned above, it can be allowed for anybody. See man mount and man fstab for more detailed information, but be prepared for a long read. :) |
thanks, I guess my only problem now is when does the fstab refresh? cause i'm trying the mount with new details and it's giving me root only error.
|
Whoah, between reading and writing, several posts sprang up. :D
Both "user" and "users" are possible in fstab. "user" restricts the action to a single user--that is only the user who mounted the device can unmount it. "users" allows any user to access the device; user B can unmount a device user A mounted, for example. |
It was prob last mounted by root. Try umount as root, then try again as yourself.
|
All times are GMT -5. The time now is 09:11 PM. |