Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

NTFS-3g only mountable as root

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
18 posts • Page 1 of 1
Author
Message
SirEdgar2nd
n00b
n00b
Posts: 32
Joined: Wed Jun 30, 2010 3:17 am

NTFS-3g only mountable as root

  • Quote

Post by SirEdgar2nd » Tue Aug 10, 2010 3:30 pm

So, I installed fuse and ntfs3g, I can run it just fine as root. Issue is when that I can't mount it as a normal user either in the terminal or in dolphin.

And I noticed during compile I got this

Code: Select all

***************************************************************************
* WARNING  WARNING  WARNING  WARNING  WARNING  WARNING  WARNING  WARNING   *
* The FUSE user space binaries were NOT installed with root directory *
* executable prefix. This means that automounting NTFS volumes during boot *
* could fail. This can be fixed the below way by reinstalling FUSE using *
* the right 'configure' option during FUSE compilation: *
*       ./configure --exec-prefix=/ *
*       make && sudo make install *
* WARNING  WARNING  WARNING  WARNING  WARNING  WARNING  WARNING  WARNING *
****************************************************************************
o-o I should also note kdesu allows me to mount it just fine (in dolphin which makes since that that runs dolphin with root privileges).

Here is my /etc/fstab

Code: Select all

/dev/sda1               /mnt/windows    ntfs-3g         noauto,users            0 0
I also tried 'user' instead of users but that didn't work so I changed it back
Top
Amity88
Apprentice
Apprentice
User avatar
Posts: 265
Joined: Sat Jul 03, 2010 3:42 pm
Location: Third planet from the Sun

  • Quote

Post by Amity88 » Tue Aug 10, 2010 3:37 pm

did you emerge ntfs3g using suid flag?
Ant P. wrote:The enterprise distros sell their binaries. Canonical sells their users.
Also... Be ignorant... Be happy! :)
Top
SirEdgar2nd
n00b
n00b
Posts: 32
Joined: Wed Jun 30, 2010 3:17 am

  • Quote

Post by SirEdgar2nd » Tue Aug 10, 2010 3:39 pm

Amity88 wrote:did you emerge ntfs3g using suid flag?
huh? I don't get that? o_o;;
Top
ssteinberg
Apprentice
Apprentice
Posts: 206
Joined: Fri Jul 09, 2010 6:35 pm
Location: Israel

  • Quote

Post by ssteinberg » Tue Aug 10, 2010 3:41 pm

$ emerge -pv ntfs3g

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] sys-fs/ntfs3g-2010.3.6 USE="acl external-fuse udev -debug -hal -suid" 818 kB

Total: 1 package (1 reinstall), Size of downloads: 818 kB
Top
SirEdgar2nd
n00b
n00b
Posts: 32
Joined: Wed Jun 30, 2010 3:17 am

  • Quote

Post by SirEdgar2nd » Tue Aug 10, 2010 3:50 pm

ssteinberg wrote:$ emerge -pv ntfs3g

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] sys-fs/ntfs3g-2010.3.6 USE="acl external-fuse udev -debug -hal -suid" 818 kB

Total: 1 package (1 reinstall), Size of downloads: 818 kB

*facepalms* OH... wow >.<;; Now I feel slow. XD


Well, I just recompiled with suid support, just not exactly sure what that was meant to accomplish? Yeah there was no suid when I first used it though.
Top
Amity88
Apprentice
Apprentice
User avatar
Posts: 265
Joined: Sat Jul 03, 2010 3:42 pm
Location: Third planet from the Sun

  • Quote

Post by Amity88 » Tue Aug 10, 2010 3:52 pm

suid lets normal users mount partitions using ntfs-3g
Ant P. wrote:The enterprise distros sell their binaries. Canonical sells their users.
Also... Be ignorant... Be happy! :)
Top
SirEdgar2nd
n00b
n00b
Posts: 32
Joined: Wed Jun 30, 2010 3:17 am

  • Quote

Post by SirEdgar2nd » Tue Aug 10, 2010 4:01 pm

Ah, well I tried mounting it as a normal user again but it still doesn't work, in face I Tried it twice.


First with External Fuse support

Code: Select all

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
Then without

Code: Select all

Error opening '/dev/sda1': Permission denied
Failed to mount '/dev/sda1': Permission denied
Please check '/dev/sda1' and the ntfs-3g binary permissions,
and the mounting user ID. More explanation is provided at
http://ntfs-3g.org/support.html#unprivileged
And I did just set up suid too :/ or use the flag unless I was supposed to do something else with suid...
Top
ssteinberg
Apprentice
Apprentice
Posts: 206
Joined: Fri Jul 09, 2010 6:35 pm
Location: Israel

  • Quote

Post by ssteinberg » Tue Aug 10, 2010 4:04 pm

Did you read http://www.tuxera.com/community/ntfs-3g ... privileged?
Top
Amity88
Apprentice
Apprentice
User avatar
Posts: 265
Joined: Sat Jul 03, 2010 3:42 pm
Location: Third planet from the Sun

  • Quote

Post by Amity88 » Tue Aug 10, 2010 4:29 pm

@SirEdgar2nd, ok. Run this :

Code: Select all

echo sys-fs/ntfs3g suid -external-fuse >> /etc/portage/package.use
emerge ntfs3g
now you will be able to mount using ntfs-3g to a directory where the user has write permissions in.
Ant P. wrote:The enterprise distros sell their binaries. Canonical sells their users.
Also... Be ignorant... Be happy! :)
Top
SirEdgar2nd
n00b
n00b
Posts: 32
Joined: Wed Jun 30, 2010 3:17 am

  • Quote

Post by SirEdgar2nd » Tue Aug 10, 2010 4:33 pm

ssteinberg wrote:Did you read http://www.tuxera.com/community/ntfs-3g ... privileged?

After reading it, I don't fully comprehend it... O_o

Code: Select all

   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 
1.) I understood this, which is why I disabled external fuse use flag
2. ) Obviously, I have the latest Which is way above 1.2506
3.) I didn't quite get this?
4.) So, I need access to the directory?
5.) Huh, I thought this was related to 4 but I wasn't sure...

Then I read the rest of it and

Code: Select all

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.
SO not only do I not grasp things like this too well, there is that too. Well, not too much of a problem since I am the only user but I occasionally make a new user account on my system whenever someone stays in the house temporarily. So yeah. :/
Amity88 wrote:@SirEdgar2nd, ok. Run this :

Code: Select all

echo sys-fs/ntfs3g suid -external-fuse >> /etc/portage/package.use
emerge ntfs3g
now you will be able to mount using ntfs-3g to a directory where the user has write permissions in.
But I already disabled external-fuse? o_O;; ALthough lemme check if I can do so if I have write permission in a folder.

Edit:

Code: Select all

edgar@localhost ~ $ ntfs-3g /dev/sda1 /home/edgar/windows
Error opening '/dev/sda1': Permission denied
Failed to mount '/dev/sda1': Permission denied
Please check '/dev/sda1' and the ntfs-3g binary permissions,
and the mounting user ID. More explanation is provided at
http://ntfs-3g.org/support.html#unprivileged
That didn't work out lol...
Last edited by SirEdgar2nd on Tue Aug 10, 2010 4:43 pm, edited 1 time in total.
Top
Amity88
Apprentice
Apprentice
User avatar
Posts: 265
Joined: Sat Jul 03, 2010 3:42 pm
Location: Third planet from the Sun

  • Quote

Post by Amity88 » Tue Aug 10, 2010 4:42 pm

I use the default settings with ntfs-3g myself. I use a normal user account, and whenever I need to read/write to a ntfs partition, I access the root terminal and mount it. It may sound weird that you are restricting yourself in your own computer, feels that way after using the 'default' administrator account that windows gives. It just means that if something goes rogue, the damage will be confined to ONLY what the user has access to, this is one of the reasons why you shouldn't run as root.

I hope the problem is all solved now :) Also, most of the basic stuff are well documented, Google is your friend ;)
Ant P. wrote:The enterprise distros sell their binaries. Canonical sells their users.
Also... Be ignorant... Be happy! :)
Top
Amity88
Apprentice
Apprentice
User avatar
Posts: 265
Joined: Sat Jul 03, 2010 3:42 pm
Location: Third planet from the Sun

  • Quote

Post by Amity88 » Tue Aug 10, 2010 4:49 pm

try this(from root) :

Code: Select all

mkdir /mnt/windows
chown edgar:edgar /mnt/windows
try mounting it to /mnt/windows now
Ant P. wrote:The enterprise distros sell their binaries. Canonical sells their users.
Also... Be ignorant... Be happy! :)
Top
SirEdgar2nd
n00b
n00b
Posts: 32
Joined: Wed Jun 30, 2010 3:17 am

  • Quote

Post by SirEdgar2nd » Tue Aug 10, 2010 4:57 pm

Well, that didn't quite work out either, I get the same results as if I mounted it on my home directory. XD

Code: Select all

edgar@localhost ~ $ ntfs-3g /dev/sda1 /mnt/windows
Error opening '/dev/sda1': Permission denied
Failed to mount '/dev/sda1': Permission denied
Please check '/dev/sda1' and the ntfs-3g binary permissions,
and the mounting user ID. More explanation is provided at
http://ntfs-3g.org/support.html#unprivileged

I guess I should just mount it the more 'restrictive' root way then. o_O;; Its a little annoying but it can be done. I also decided to change that directories ownership back to root:root but if I get any more piece of advice on how to set it up to work on normal users I'll gladly try it. lol
Top
Amity88
Apprentice
Apprentice
User avatar
Posts: 265
Joined: Sat Jul 03, 2010 3:42 pm
Location: Third planet from the Sun

  • Quote

Post by Amity88 » Tue Aug 10, 2010 5:04 pm

what groups are the user in? I think edgar doesn't have permissions to access /dev/sda1.

Code: Select all

groups edgar
Ant P. wrote:The enterprise distros sell their binaries. Canonical sells their users.
Also... Be ignorant... Be happy! :)
Top
SirEdgar2nd
n00b
n00b
Posts: 32
Joined: Wed Jun 30, 2010 3:17 am

  • Quote

Post by SirEdgar2nd » Tue Aug 10, 2010 5:06 pm

Amity88 wrote:what groups are the user in? I think edgar doesn't have permissions to access /dev/sda1.

Code: Select all

groups edgar

Code: Select all


localhost edgar # groups edgar
wheel floppy audio cdrom video usb users plugdev games edgar

Top
Amity88
Apprentice
Apprentice
User avatar
Posts: 265
Joined: Sat Jul 03, 2010 3:42 pm
Location: Third planet from the Sun

  • Quote

Post by Amity88 » Wed Aug 11, 2010 3:07 am

ok, add edgar to the disk group.

Code: Select all

gpasswd -a edgar disk
Ant P. wrote:The enterprise distros sell their binaries. Canonical sells their users.
Also... Be ignorant... Be happy! :)
Top
SirEdgar2nd
n00b
n00b
Posts: 32
Joined: Wed Jun 30, 2010 3:17 am

  • Quote

Post by SirEdgar2nd » Wed Aug 11, 2010 1:33 pm

Amity88 wrote:ok, add edgar to the disk group.

Code: Select all

gpasswd -a edgar disk

Thank you, its actually doable now.
Top
Amity88
Apprentice
Apprentice
User avatar
Posts: 265
Joined: Sat Jul 03, 2010 3:42 pm
Location: Third planet from the Sun

  • Quote

Post by Amity88 » Wed Aug 11, 2010 4:50 pm

glad to help :)
Ant P. wrote:The enterprise distros sell their binaries. Canonical sells their users.
Also... Be ignorant... Be happy! :)
Top
Post Reply

18 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic