LinuxQuestions.org
Review your favorite Linux distribution.
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 05-25-2004, 09:54 AM   #1
class_struggle
Member
 
Registered: Nov 2003
Location: where rock meets hard place
Distribution: 1- Knoppix 2-Gentoo
Posts: 121

Rep: Reputation: 15
norm user mount problem


I spend more and more time as superuser because of problems like these:

I want to mount a partition (ntfs, so happens) while I'm a normal user.

It tells me only root can issue such a command.

Well, mounting and umounting is a very mundane task, which it should be in the power of a normal user to do. I don't know how to change this policy.

I found it easier to add my normal user to sudoers, and I was able to sudo mount as normal user. Great, it's even more frustrating, because you appear to mount properly, but then it doesn't let you read the partition.

I'm definite there's a easy way around this. Is the some sort of "mount config" file where I can allow normal users to mount?
 
Old 05-25-2004, 10:03 AM   #2
herbc
Member
 
Registered: May 2004
Location: United States
Distribution: Slackware 10.0
Posts: 72

Rep: Reputation: 15
man fstab or man mount

Edit the line in fstab that refers to your ntfs partition, so that it contains the user option. You
must be root to edit fstab. Once mounted, you can check the permissions of the mount
point. Permissions can be changed with the chmod command or chgrp commands. man each
of them to learn more.
 
Old 05-25-2004, 10:15 AM   #3
Baldrick65
Member
 
Registered: Aug 2003
Location: Dunedin NZ
Distribution: Mint 13 Cinnamon
Posts: 653

Rep: Reputation: 31
class_struggle,

Here is the line in my /etc/fstab file:
Code:
/dev/hda1 /mnt/win_c ntfs iocharset=iso8859-15,ro,umask=0 0 0
This mounts my WinXP drive under /mnt/win_c, readable by all normal users.

HTH
Baldrick
 
Old 05-25-2004, 12:57 PM   #4
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
in order to get your users to be able to mount and umount partitions, add the option of "user" to your /etc/fstab files to let them mount and umount
 
Old 05-27-2004, 11:10 AM   #5
class_struggle
Member
 
Registered: Nov 2003
Location: where rock meets hard place
Distribution: 1- Knoppix 2-Gentoo
Posts: 121

Original Poster
Rep: Reputation: 15
Thanks all for your answers. However, I still haven't been having any luck.

I noticed I had "users" (i.e. plural) in my fstab options, but actually dropping the "s" didn't come good. I used Baldrick settings also (which significantly don't have "user") and no luck either.

Thanks anyway .. my search will continue. Quite the little rascal though: fstab and mount. :-)
 
Old 05-27-2004, 01:33 PM   #6
mcd
Member
 
Registered: Aug 2003
Location: Boulder, CO
Distribution: Slackware, RHEL, CentOS
Posts: 825

Rep: Reputation: 33
try umask=000, that worked for me
 
Old 05-27-2004, 04:40 PM   #7
adamwenner
Member
 
Registered: Aug 2003
Distribution: windows xp home, windows 98, red hat 9, fedora core 3, redhat enterprise linux, win2000 pro/server
Posts: 217

Rep: Reputation: 32
from a redhat website


By default, only root may perform mounts. The user option specifies that anyone should be able to perform the predefined mount.

therefore, if u add the "user" option in the options of your fstab file, it should allow the user to mount and umount that one partition, user has to be done to all the lines in the fstab
 
Old 05-27-2004, 04:51 PM   #8
herbc
Member
 
Registered: May 2004
Location: United States
Distribution: Slackware 10.0
Posts: 72

Rep: Reputation: 15
Is it possible that someone changed the permissions on mount and umount to 744 or some such thing? Permissions need to be 755 for non-root users to be able to execute the commands. Do a which mount to find the path, cd to the directory and ls -l mount to check the permissions.
 
Old 05-29-2004, 08:26 AM   #9
class_struggle
Member
 
Registered: Nov 2003
Location: where rock meets hard place
Distribution: 1- Knoppix 2-Gentoo
Posts: 121

Original Poster
Rep: Reputation: 15
rws?

The umask setting doesn't seem to help me, either.

I checked the mount file itself, and I see that under permissions, the owner (root of course) has r, w and s permissions. S-permission, not x-permission. the umount command has the same thing. They seem to be the only files there in /bin with this exotic setting. Can anybody shed any light?

Meanwhile I'll continue hunting .... thx 4 replies.
 
Old 05-29-2004, 08:50 AM   #10
chii-chan
Member
 
Registered: Sep 2003
Location: chikyuu (E103N6)
Distribution: Redhat 8.0 (2.4.25-custom), Fedora Core 1 (2.4.30-custom)
Posts: 357

Rep: Reputation: 30
I don't think you should allow the user to mount/umount the filesytem. By adding the entry into fstab means that you mount the filesystem when you bootup, then you dont need to do any mounting/umounting. I would have it like this:

/dev/hda1 /mnt/win_c ntfs defaults,ro,umask=0000 0 0

Or is it bcs you want to allow user to open an external drive?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to give not-root user ability to mount devices to any mount point??? jdupre Linux - General 8 02-04-2012 11:03 AM
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 12:34 PM
User Mount LinuxNoob1234 Linux - Newbie 2 05-18-2005 11:58 PM
user cant mount after chmod 777 /bin/mount misterwiddle Linux - General 2 04-06-2005 06:36 PM
how to use 'mount' as user servnov Linux - Newbie 6 11-02-2004 03:49 PM


All times are GMT -5. The time now is 04:17 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration