Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
It all started with me wanting to give owner/rwx to a specific user on a mount. After a quick search through the manpages I found it.
So, I used.
mount -t ntfs -o uid=xxxx,gid=xxxx,umask=077 /dev/hda1 /mnt/winblows
Worked like a charm.
Now, the only problem is I'm getting sick of SU ing to root to mount the drive all the time. I saw something that caught my eyes in the fstab man. An option called owner. Which is supposed to allow the owner to mount the drive?
I'm curious how I should do this. I've edited my fstab to include:
I added uid / gid because I figured it wouldn't know who the owner / group was. I think I got this completely screwed up and this isn't how you do it at all :P Any ideas? It would be a lot easier if I just mounted it at boot --- but I don't want to :P
1. The owner keyword (in man fstab) says "allow device owner to mount". That's a bit vague under the circumstances. It could mean the owner you specified with your "uid=xxxx" option. However, I would think the documentation would explicitly mention that were the case (i.e. the uid=<blah> option must be used if the owner option is used). The other option, which is far more likely I think, is that "owner" refers to the owner of the device file itself. Do a chown some_user /dev/hda1 and then see if that particular user can mount the drive.
2. You could consider using the "user" option in fstab. Given that you specify the owner and group ids, then it would only be a matter of restricting "other" user access to the mounted drive. I honestly don't know how simple/complex that might be, but it might be an option.
note: I haven't tried either of these. So take this advice for what its worth
Slackware, I can give the user permission to access the drive. But I want to give the specific user permission to mount the drive. I could add 'user' to fstab but that would let anyone mount it whereas I just want myself to be able to do it.
Nothing is wrong with your advice I was just responding to the guy above me . It's annoying how simple the solution can be at times. I thought adding uid=xxxx in the fstab would make me the owner when mount went through it. Thanks for your help, btw. This would've kept me up many a night. Perhaps I should stop looking for difficult solutions to simple problems, hehe.
ppuru: Yeah, I know I could've done that. I would've used user however since I don't need someone else umounting something I mounted. However, I only want ONE SPECIFIC user to be able to mount it (well, excluding root, naturally).
unless of course you can do that with what you posted and i'm just misunderstanding :P
Ok... I guess I got confused. I was assuming that you had read the second option I laid out, and had a kind of tunnel-vision: the "user" wasn't quite what you wanted and were distracted from the #1.
I've been involved in a few threads where the answer was presented in the first one or two responses, but copletely overlooked. Actually, it's happened twice in as many days. I wanted to make sure that didn't happen (frustration setting in on my part). I apologize if the response was taken as being a bit too blunt perhaps.