LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Small question concerning mount (https://www.linuxquestions.org/questions/linux-newbie-8/small-question-concerning-mount-236637/)

colabus 09-29-2004 09:16 AM

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 ?

AAnarchYY 09-29-2004 09:21 AM

well if you add the user option to the floppy device line in fstab then users can mount a floppy ;)

colabus 09-29-2004 09:28 AM

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
maybe like?
Code:

/dev/fd0        /floppy        auto    rw,user,noauto,colabus          0      0

AAnarchYY 09-29-2004 09:31 AM

right place, wrong word. you add the actual word "users"
Code:

/dev/fd0        /mnt/fd0        auto    noauto,nosuid,rw,users          0      0

colabus 09-29-2004 09:37 AM

yes but i had this originally and it read that only root could mount..

AAnarchYY 09-29-2004 09:39 AM

"users" not "user"

colabus 09-29-2004 09:43 AM

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 :)

AAnarchYY 09-29-2004 09:45 AM

shoudnt need to, it should take effect as soon as you save

David the H. 09-29-2004 09:48 AM

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. :)

colabus 09-29-2004 09:54 AM

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.

David the H. 09-29-2004 09:57 AM

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.

chrism01 09-29-2004 10:14 AM

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.