LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 01-08-2011, 02:10 PM   #1
masmddr
Member
 
Registered: Jun 2005
Location: Israel
Distribution: Arch Linux
Posts: 92

Rep: Reputation: 16
Mounting NTFS with ntfs-3g and fuse as a user?


Hello.
On a clean install of Arch linux I edited fstab to be like so :
Code:
/dev/disk/by-id/usb-Hitachi_HTS543232L9A300_9002555dd84a21024b000000-0:0-part1 /media/EXT   ntfs-3g   user,rw,uid=mas,gid=users,noauto   0 0
I tried ntfs and ntfs-3g but the result is the same
I can mount root but I would like to be able to mount as a user.
When I try to mount as a user I get
Code:
Unprivileged user can not mount NTFS block devices using the external FUSE
library. Either mount the volume as root, or rebuild NTFS-3G with integrated
FUSE support and make it setuid root. Please see more information at
http://ntfs-3g.org/support.html#unprivileged
Before installing ntfs-3g I was able to mount as a user but there was no rw permission.
Any way to mount an ntfs partition as a user without suid as the message said?
 
Old 01-08-2011, 03:05 PM   #2
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
You think chmod will help you?
 
Old 01-08-2011, 04:21 PM   #3
masmddr
Member
 
Registered: Jun 2005
Location: Israel
Distribution: Arch Linux
Posts: 92

Original Poster
Rep: Reputation: 16
I don't see how...
I can't mount the device, though other devices with the same options in fstab (also mount under /media/) can be mounted and accessed with a regular user.
My problem is with ntfs devices.
 
Old 01-08-2011, 04:42 PM   #4
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 70
You don't have sufficient privileges to mount those ntfs devices. Create a group. Add your user to the group. Then give the devices group permissions. That should work.
 
Old 01-08-2011, 04:57 PM   #5
masmddr
Member
 
Registered: Jun 2005
Location: Israel
Distribution: Arch Linux
Posts: 92

Original Poster
Rep: Reputation: 16
Changing the group on /dev/sdb and /dev/sdb1 ( I couldn't change the group in /dev/disk/by-id/) and chmod a+rwx just in case didn't change anything.

Quote:
[root@masARCH mas]# ls -l /dev/sdb
brwxrwxrwx 1 root storage 8, 16 Jan 9 00:50 /dev/sdb
[root@masARCH mas]# ls -l /dev/sdb1
brwxrwxrwx 1 root storage 8, 17 Jan 9 00:50 /dev/sdb1
changed fstab to point to /dev/sdb1 and still nothing.

I'm probably doing it wrong aren't I ? :P
 
Old 01-08-2011, 05:10 PM   #6
X.Cyclop
Member
 
Registered: Jun 2006
Location: Tlv
Distribution: Arch!
Posts: 120

Rep: Reputation: 21
Did you try adding umask=000 ?
 
Old 01-08-2011, 05:16 PM   #7
masmddr
Member
 
Registered: Jun 2005
Location: Israel
Distribution: Arch Linux
Posts: 92

Original Poster
Rep: Reputation: 16
Wouldn't that just give me rwx permissions?
I tried adding it now and still no go.

I have rw permissions on the drive as a user even if I mount it as root, I just can't mount ntfs with a user, other file systems can be mounted as a user.
 
Old 01-08-2011, 11:47 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
you have been fallowing the arch wiki ?
https://wiki.archlinux.org/index.php/NTFS-3G
it works

and HOW are you starting system daemons ?(rc.conf ) and is HAL used ?
and see hal ntfs page
https://wiki.archlinux.org/index.php...S_write_access
 
Old 01-09-2011, 12:14 AM   #9
alan99
Member
 
Registered: Mar 2010
Distribution: Debian
Posts: 180

Rep: Reputation: 31
Users can be given the right to mount ntfs-3g. Check and make have the fuse module loaded, that might help. Also the file /usr/bin/ntfs-3g must have the set-uid bit set so that you can use the mount function without actually switching to be the root user. Also, you should have permission to the mount point -- You could make the group permission of the mount point a member of users group and your users that you want to mount the drive to be members of user group. I tried these things and now I can mount my ntfs partition as a non-root user.
 
Old 01-09-2011, 06:18 AM   #10
masmddr
Member
 
Registered: Jun 2005
Location: Israel
Distribution: Arch Linux
Posts: 92

Original Poster
Rep: Reputation: 16
I have been following the arch wiki.
I tried to do this without HAL but now I added HAL as the wiki said but still no mounting as user.
DAEMONS in rc.conf:
Quote:
DAEMONS=(syslog-ng acpid dbus hal cpufreq !network netfs crond ufw wicd)
The user is in the storage,optical,HAL groups.

Now a question, Everyone seems to direct me to how to get rw permissions on the mounted ntfs partition, I can't mount it to begin with.
If I mount it with root then everything is fine and I even have rw permissions as a normal user, I just can't mount it as a normal user :

Quote:
[mas ~]$ mount /dev/disk/by-id/usb-Hitachi_HTS543232L9A300_9002555dd84a21024b000000-0:0-part1
Unprivileged user can not mount NTFS block devices using the external FUSE
library. Either mount the volume as root, or rebuild NTFS-3G with integrated
FUSE support and make it setuid root. Please see more information at
http://ntfs-3g.org/support.html#unprivileged
fstab should allow me to have rw permissions as a normal user:
Quote:
/dev/disk/by-id/usb-Hitachi_HTS543232L9A300_9002555dd84a21024b000000-0:0-part1 /media/EXT ntfs user,rw,uid=mas,gid=users,noauto 0 0
I can however mount other filesystems with a normal user with the same setup in fstab.
Also I should have mentioned earlier that I am not using any file manager rather I am doing this in a terminal.

alan99:
I tried setting /bin/ntfs-3g (/usr/bin/ntfs-3g doesn't exist) as set-uid and now as a normal user I get :

Quote:
Mount is denied because setuid and setgid root ntfs-3g is insecure with the
external FUSE library. Either remove the setuid/setgid bit from the binary
or rebuild NTFS-3G with integrated FUSE support and make it setuid root.
Please see more information at http://ntfs-3g.org/support.html#unprivileged
I don't know how to rebuild NTFS-3G with integrated FUSE support since I am installing it from the package manager pacman, it installed fuse as a dependency for NTFS-3G.
 
Old 01-09-2011, 12:06 PM   #11
networking.dept
Member
 
Registered: Dec 2010
Location: Ahmedabad
Distribution: Red Hat Enterprise Linux and Fedora
Posts: 44

Rep: Reputation: 8
@masmddr, Please try following things

Check it by editing your /etc/fstab entry like below

<device> <local-mount> ntfs-3g defaults 0 0
or
<device> <local-mount> ntfs defaults 0 0
or
/sbin/mount.ntfs-3g /device-partition <mount-point>

or you can mount your ntfs on local folder lets say /mnt and then just give a recursive permission using chmod should work. Try and let us know its working or not. You can also try with sudo.

Last edited by networking.dept; 01-09-2011 at 12:10 PM.
 
Old 01-09-2011, 01:02 PM   #12
masmddr
Member
 
Registered: Jun 2005
Location: Israel
Distribution: Arch Linux
Posts: 92

Original Poster
Rep: Reputation: 16
<device> <local-mount> ntfs-3g defaults 0 0
and
<device> <local-mount> ntfs defaults 0 0
Didn't change much since defaults mean a user can't mount the device, but adding "user" to it didn't help either.
Invoking mount.ntfs-3g directly gave me the same error about being unprivileged.
So I gave up and used sudo. I was trying to keep it as simple as possible but it seems in this case sudo is simpler.

Thank you all for your time and patience.
 
  


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
mounting NTFS on redhat: can't install fuse dsollen Linux - Software 7 09-10-2009 10:38 AM
Mounting NTFS w/ fuse & ntfs-3g Elguapo Linux - Software 1 07-07-2007 06:13 PM
ntfs-3g with FUSE (NTFS WRITE) - what do I put in fstab 1kyle SUSE / openSUSE 3 02-07-2007 06:08 AM
HELP with user mounting ntfs kevingpo Fedora 1 07-23-2005 10:00 AM
User mounting NTFS partician cvc505 Linux - General 6 08-12-2004 11:52 PM

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

All times are GMT -5. The time now is 01:33 AM.

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