LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-03-2007, 07:53 PM   #1
WanglessOlasov
Member
 
Registered: Jul 2003
Distribution: Slackware 9.0
Posts: 45

Rep: Reputation: 15
Can't mount USB HD as normal user


Hey, I've got an external hard drive that I'd like to be able to mount and unmount as a normal user. It mounts fine as root, and I can unmount as a user, but when I try mounting as a user it gives me this:

$ mount /mnt/ehdd
Error opening partition device: Permission denied
Failed to startup volume: Permission denied
Failed to mount '/dev/sdb1': Permission denied

I've tried the 'user' and 'users' options in /etc/fstab, but it doesn't seem to work. Just for kicks, here's my fstab:

/dev/sda2 swap swap defaults 0 0
/dev/sda3 / reiserfs defaults 1 1
/dev/sda1 /mnt/winxp ntfs-3g noauto,ro,user,dmask=000,fmask=111 1 0
/dev/sdb1 /mnt/ehdd ntfs-3g noauto,rw,user,dmask=000,fmask=111 1 0
/dev/cdrom /mnt/cdrom auto noauto,users,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0

If anybody had any ideas, I'd be really grateful.

Last edited by WanglessOlasov; 10-03-2007 at 08:14 PM.
 
Old 10-03-2007, 10:22 PM   #2
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Debian, Slackware
Posts: 7,342

Rep: Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746
Quote:
Originally Posted by WanglessOlasov View Post
Hey, I've got an external hard drive that I'd like to be able to mount and unmount as a normal user. It mounts fine as root, and I can unmount as a user, but when I try mounting as a user it gives me this:

$ mount /mnt/ehdd
Error opening partition device: Permission denied
Failed to startup volume: Permission denied
Failed to mount '/dev/sdb1': Permission denied

I've tried the 'user' and 'users' options in /etc/fstab, but it doesn't seem to work. Just for kicks, here's my fstab:

/dev/sda2 swap swap defaults 0 0
/dev/sda3 / reiserfs defaults 1 1
/dev/sda1 /mnt/winxp ntfs-3g noauto,ro,user,dmask=000,fmask=111 1 0
/dev/sdb1 /mnt/ehdd ntfs-3g noauto,rw,user,dmask=000,fmask=111 1 0
/dev/cdrom /mnt/cdrom auto noauto,users,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0

If anybody had any ideas, I'd be really grateful.
Edit /etc/group

Add your regular user to plugdev, cdrom, audio, video, wheel and any other groups you want. Save. That should do it.
 
Old 10-04-2007, 04:51 AM   #3
igu
Member
 
Registered: Jan 2003
Distribution: Fedora, Gentoo, SUSE, Mandriva
Posts: 127

Rep: Reputation: 15
This may help: http://www.ntfs-3g.org/support.html#useroption

Type the below as root then user mount should work:
Code:
chmod 4755 $(which ntfs-3g)
 
Old 10-04-2007, 05:26 PM   #4
WanglessOlasov
Member
 
Registered: Jul 2003
Distribution: Slackware 9.0
Posts: 45

Original Poster
Rep: Reputation: 15
Yes! It worked. I just had to set the ntfs-3g binary to setuid-root. I'm still not entirely sure what that means, though. Does having the setuid flag set make the binary run with permissions of the owner of the file, no matter who executes it? That seems kinda scary. But oh well. It works! thanks a lot.
 
  


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
Giving user 'www-data' same permissions as normal user MikeOfAustin Linux - Software 5 06-08-2007 02:50 AM
how to umount auto-mounted usb flashdisk by normal user JrLz SUSE / openSUSE 5 04-27-2006 02:38 AM
Running super user commands as normal user mickyg Linux - Security 5 10-14-2005 07:25 PM
Games runs slow as normal user, but fast as root user mcore Linux - Software 2 06-07-2004 11:11 PM
normal user = super user jayakrishnan Linux - General 4 03-19-2002 09:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:58 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