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 02-09-2014, 11:23 PM   #1
gonny95
Member
 
Registered: Feb 2014
Distribution: Slackware,Ubuntu
Posts: 84

Rep: Reputation: Disabled
Unhappy ntfs mount as non-root doesn't work!


I'm using Slackware 14.1 32-bit





In my /etc/fstab
Code:
/dev/sda2        /.1C             ntfs	        rw,noauto,user  1   0
/dev/sda5        /.1D             ntfs        rw,noauto,user   1   0
/dev/sdb1        /.2E             ntfs        rw,noauto,user  1   0
And permissions of mount points are:
root :rw
users :rw
others :rw

I made a user like that:

id:guest
initial group:users
additional groups:root vboxusers

I changed initial group several times such as root,vboxusers..anything

However it dosn't work at all

when I try to mount a disk:


Code:
mount /dev/sdb1
Error opening '/dev/sdb1' : Permission denied
Failed to mount '/dev/sdb1' : Permission denied
Please check 'dev/sdb1' and ntfs-3g binary permissions,
and the mounting user ID. More  explanation is provided at
http://tuxera.com/community/ntfs-3g-faq/#unprivileged
Any of your replies will be greatly appreciated

Last edited by gonny95; 02-09-2014 at 11:31 PM.
 
Old 02-10-2014, 12:11 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
I think that the answer is in the document quoted at end of your post:
http://tuxera.com/community/ntfs-3g-faq/#unprivileged
It says this:
Quote:
Why have chmod and chown no effect?
By default files on NTFS are owned by root with full access to everyone. To get standard per-file protection you should mount with the “permissions” option. Moreover, if you want the permissions to be interoperable with a specific Windows configuration, you have to map the users.

Why can’t unprivileged users mount block devices? or Why do I get “fusermount: option blkdev is privileged” error?
Unprivileged block device mounts work only if all the below requirements are met:
  1. ntfs-3g is compiled with integrated FUSE support
  2. the ntfs-3g binary is at least version 1.2506
  3. the ntfs-3g binary is set to setuid-root
  4. the user has access right to the volume
  5. the user has access right to the mount point
The root user can make an ntfs-3g binary setuid-root as shown below
chown root $(which ntfs-3g)
chmod 4755 $(which ntfs-3g) In such case the driver will also be able
  • to fix common FUSE kernel module loading problems
  • to create the required but sometimes incorrectly removed or missing FUSE device file
Please note that using setuid-root can result unforeseen privilege escalation and its usage is discouraged. Only the absolutely trusted users must be granted such access. Below is an example how this can be done for users in the ntfsuser group to be able to mount any NTFS volume if they have also the needed volume access rights. chown root.ntfsuser $(which ntfs-3g)
chmod 4750 $(which ntfs-3g) The setuid-root ntfs-3g driver applies the principle of least privilege during its lifetime as a safety measure.

Why don’t the ‘user’ and ‘users’ options work in /etc/fstab?
The ‘mount’ command doesn’t invoke the ntfs-3g binary with the needed privilege after it has checked and approved the user is entitled to mount a given device on a specified mount point, hereby the user can’t open the device he got the approval in /etc/fstab. This is a problem in the ‘mount’ utility.
Solution: Use at least NTFS-3G 1.2506 with setuid-root set and make sure the user has access rights to the volume and mount point.
 
Old 02-10-2014, 07:21 AM   #3
gonny95
Member
 
Registered: Feb 2014
Distribution: Slackware,Ubuntu
Posts: 84

Original Poster
Rep: Reputation: Disabled
I've solved

It was due to permissions

/dev/sdb1 was belong to disk group

so the users must belong to disk group
 
  


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
help please: mount -t smbfs -a fails as normal user, as root, doesn't mount anything thevic Linux - Networking 11 04-09-2007 03:09 AM
NFS doesn't work work well with mounted NTFS volumes? StevenO Linux - Networking 6 02-13-2006 10:54 AM
mount NTFS - doesn't work! jabbermacy Fedora 1 08-07-2005 10:55 AM
Write to NTFS mount as non-root electronique Slackware 2 11-01-2004 02:24 AM
Captive NTFS doesn't work? ImpactDNI Linux - Software 5 09-02-2004 06:40 PM

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

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