Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I wasn't sure if I should put this in hardware, so I put it here instead. I added the line
/dev/sda1 /mnt/sda auto noauto,user,ro 0 0
to my fstab file in order to get the pictures from my digital camera (Konica KD-100 if it matters). It works ok, but I can't mount when I'm using my normal user account. I get the message: "mount: only root can do that". I thought by putting "user" in the options list, I'd be able to use my user account and not have to su to root . Could someone explain please?
Also, when I'm done with my camera and need to use "umount /dev/sda1", sometimes I get a message saying /mnt/sda is busy. Is there any way I can tell that it's busy, so I know to wait before issuing umount, or do I just leave it for a few minutes and try?
user Allow an ordinary user to mount the file system. The
name of the mounting user is written to mtab so that he
can unmount the file system again. This option implies
the options noexec, nosuid, and nodev (unless overridden
by subsequent options, as in the option line
user,exec,dev,suid).
users Allow every user to mount and unmount the file system.
This option implies the options noexec, nosuid, and nodev
(unless overridden by subsequent options, as in the
option line users,exec,dev,suid).
Nope, that didn't work either. I thought it was a permissions problem, so I did "chmod a+rwx /mnt/sda", but I still get "mount: only root can do that". Should I change the owner using chown?
Originally posted by Nylex I wasn't sure if I should put this in hardware, so I put it here instead. I added the line
/dev/sda1 /mnt/sda auto noauto,user,ro 0 0
to my fstab file in order to get the pictures from my digital camera (Konica KD-100 if it matters). It works ok, but I can't mount when I'm using my normal user account. I get the message: "mount: only root can do that". I thought by putting "user" in the options list, I'd be able to use my user account and not have to su to root . Could someone explain please?
Also, when I'm done with my camera and need to use "umount /dev/sda1", sometimes I get a message saying /mnt/sda is busy. Is there any way I can tell that it's busy, so I know to wait before issuing umount, or do I just leave it for a few minutes and try?
Thanks for any answers!
It can be confusing... root can only mount a /dev even if you have 'user' set in fstab... users can mount the "mount point" only... /mnt/thumdrive...
A user can mount a device like this:
mount /mnt/thumbdrive
root can mount like this:
mount /dev/sda1 /mnt/thumbdrive
If you mount as root and then access as user then go back to root to attempt to unmount it may give you busy message if user is still accessing...
use:
fuser -m /mnt/mount_point
This will give you a list of running processes for that specific drive... You can then kill the process to release the drive for unmounting...
As to the device being busy, fuser is indeed a great command to use, but often the 'busy' warning is simply because you nautilus/konqueror/you preferred graphical app still has an open window with the device you're trying to unmount so all you need to do is close it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.