LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 07-01-2004, 01:31 AM   #1
glorb
LQ Newbie
 
Registered: Jun 2004
Posts: 6

Rep: Reputation: 0
I've finally been stumped.


Alright, here goes...

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:


/dev/hda1 /mnt/winblows ntfs noauto,uid=xxxx,gid=xxxx,owner 0 0

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
 
Old 07-01-2004, 01:33 AM   #2
glorb
LQ Newbie
 
Registered: Jun 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Maybe write a simple shell script that su's to root and mounts it for me? (I'm assuming that can be done easily)
 
Old 07-01-2004, 02:11 AM   #3
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Two things:

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
 
Old 07-01-2004, 02:21 AM   #4
KlaymenDK
Member
 
Registered: Sep 2003
Location: Denmark
Distribution: FreeBSD v6.0
Posts: 123

Rep: Reputation: 15
What's your distro? On Mandrake, you can go into Permissions in the Control Centre and just add an entry for "/mnt/winblows" giving your user proper access.
 
Old 07-01-2004, 03:07 AM   #5
glorb
LQ Newbie
 
Registered: Jun 2004
Posts: 6

Original Poster
Rep: Reputation: 0
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.
 
Old 07-01-2004, 03:29 AM   #6
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Ok, so what's wrong with the first option I mentioned? Change the device file owner to the user you want to give mount permission to and leave "owner" as an option in fstab.

Another possibility is to set up sudo. It would let you do this without futzing with fstab.
 
Old 07-01-2004, 03:37 AM   #7
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
ignore!!!

Last edited by ppuru; 07-01-2004 at 03:42 AM.
 
Old 07-01-2004, 03:40 AM   #8
glorb
LQ Newbie
 
Registered: Jun 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Dark_Helmet:


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

:Refreshed, ignored Thanks for your help though.

Last edited by glorb; 07-01-2004 at 03:44 AM.
 
Old 07-01-2004, 03:49 AM   #9
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
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.

I'm glad it's working for you now.
 
Old 07-01-2004, 04:02 AM   #10
glorb
LQ Newbie
 
Registered: Jun 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Nah, I know how it goes. You try to help someone and they completely ignore what you mentioned and continue to ask the same question no matter how much you explain yourself.

No need to apologize, miscommunication on our parts at best.

No need for us to go into Disney-mode.

Thanks for your help.

Last edited by glorb; 07-01-2004 at 04:03 AM.
 
Old 07-01-2004, 04:15 AM   #11
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
Sorry for zapping my earlier post glorb ... I did read on post#5 here (after my initial post) that you are aware of the user option.
 
Old 07-01-2004, 05:20 AM   #12
glorb
LQ Newbie
 
Registered: Jun 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Dark_Helmet: I just gave your idea a whirl. It didn't work.

However, I think I got it working one of the ways I had originally thinking.
(A line from my fstab)

/dev/hda1 /mnt/winblows ntfs noauto,uid=1000,owner,umask=077 0 0

Now, i'm not quite sure what I did differently here .... but it works.

/me bangs head against desk.. I can't believe I forgot umsask earlier.

Last edited by glorb; 07-01-2004 at 05:22 AM.
 
Old 07-01-2004, 05:58 AM   #13
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You can also use the username with the fstab uid= option entry . This may be more convenient for you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel has me stumped oneandoneis2 Linux - General 1 11-06-2005 04:49 PM
Stumped, did I not install something? Rhadryn Linux - Newbie 10 07-28-2005 11:46 AM
Finally, finally switched Celettu LinuxQuestions.org Member Success Stories 9 08-25-2004 12:59 PM
how to im stumped rocketgo Linux - Software 8 11-10-2003 10:10 PM
really has me stumped! brunogartner Linux - Newbie 4 06-30-2003 05:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration