# [Solved] Suddenly unable to automount external usb hdd

## dpetka2001

hello there...as of today i am not able to automount my external usb hdd though i could until yesterday...the hdd is in ntfs and i try to use ntfs-3g option to mount it...i can mount it from konsole as root just cannot automount it as my user...this is the error i get

```
   1.

      Error opening partition device: Permission denied

   2.

      Failed to mount '/dev/sda1': Permission denied

   3.

      Please check the volume and the ntfs-3g binary permissions,

   4.

      and the mounting user ID. More explanation is provided at

   5.

      http://ntfs-3g.org/support.html#unprivileged
```

could someone help me on how to fix it?? thanks in advance...Last edited by dpetka2001 on Sat Feb 23, 2008 1:00 am; edited 1 time in total

----------

## d2_racing

First, when you plug the HDD, do you have any error when you lunch dmesg ?

----------

## schachti

Please give us the output of emerge -pv sys-fs/ntfs3g so we can see what USE flags you used and which version is installed, and the contents of your /etc/fstab file.

----------

## dpetka2001

 *d2_racing wrote:*   

> First, when you plug the HDD, do you have any error when you lunch dmesg ?

 this is what dmesg gives me 

```
usb 2-2: new high speed USB device using ehci_hcd and address 2

usb 2-2: configuration #1 chosen from 1 choice

scsi0 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 2

usb-storage: waiting for device to settle before scanning

scsi 0:0:0:0: Direct-Access     Maxtor 6 B200P0           0000 PQ: 0 ANSI: 0

sd 0:0:0:0: [sda] 398294975 512-byte hardware sectors (203927 MB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Mode Sense: 27 00 00 00

sd 0:0:0:0: [sda] Assuming drive cache: write through

sd 0:0:0:0: [sda] 398294975 512-byte hardware sectors (203927 MB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Mode Sense: 27 00 00 00

sd 0:0:0:0: [sda] Assuming drive cache: write through

 sda: sda1

sd 0:0:0:0: [sda] Attached SCSI disk

sd 0:0:0:0: Attached scsi generic sg0 type 0

usb-storage: device scan complete
```

i can't see any error...

----------

## dpetka2001

 *schachti wrote:*   

> Please give us the output of emerge -pv sys-fs/ntfs3g so we can see what USE flags you used and which version is installed, and the contents of your /etc/fstab file.

 emerge -vp sys-fs/ntfs3g gives the following

```
root@ ~ > emerge -vp sys-fs/ntfs3g

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

Calculating dependencies... done!

[ebuild   R   ] sys-fs/ntfs3g-1.2216  USE="suid -debug" 0 kB

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

and this my /etc/fstab

```
/dev/hdf2      /      reiserfs   noatime      0 1

/dev/hdf3      none      swap      sw      0 0

/dev/hdf5      /home      reiserfs   noatime      0 2

/dev/hdf6      /usr/portage   reiserfs   noatime      0 2

/dev/hdf7      /mnt/share   vfat      users,iocharset=utf8,auto,noatime,umask=0000      0 0

/dev/hdg1      /mnt/data   ext3      noatime      0 0

/dev/disk/by-uuid/C00CD0FD0CD0F000   /media/usb/   ntfs-3g   auto,defaults,uid=1000,gid=100,user   0 0

/dev/disk/by-uuid/90E036CDE036B8F4   /media/Transcend   ntfs-3g   auto,defaults,uid=1000,gid=100,user   0 0

#/dev/hdd      /mnt/cdrom   iso9660      auto,loop,ro,user   0 0

#/dev/fd0      /mnt/floppy   auto      noauto      0 0

none                    /dev/shm                tmpfs   defaults        0 0

# NOTE: The next line is critical for boot!

none         /proc      proc      defaults   0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 

# POSIX shared memory (shm_open, shm_unlink).

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

shm         /dev/shm   tmpfs      nodev,nosuid,noexec   0 0
```

though i don't know why there are 2 entries of /dev/shm...i don't remember seeing 2 of them before...

----------

## Clad in Sky

Seems to me your drive is in /dev/sda

I don't know what your fstab means by "/dev/disk/by-uuid/90E036CDE036B8F4   /media/Transcend   ntfs-3g   auto,defaults,uid=1000,gid=100,user   0 0", but it should work if you just changed that to /dev/sda1 with the drawback that then every storage device you connect will be mounted on /media/Transcend, which is obviously not what you want but at least should give you access to your data.

Oh, btw. could ntfs-3g be wrong?

----------

## dpetka2001

well i use "dev/disk/by-uuid/90E036CDE036B8F4" in /etc/fstab so that my specific external usb hdd be mounted in /media/Transcend and not on some other mount point...it worked until recently...i tried using /dev/sda1 also in /etc/fstab but that didn't work either...anyway "dev/disk/by-uuid/90E036CDE036B8F4" should be a link to my external usb hdd whether it is actually sda1,sdb1,sdc1 or whatever...what do you mean ntfs-3g might be wrong?? root account can mount the hdd by ntfs-3g both /dev/sda1 and /dev/disk/by-uuid/C00CD0FD0CD0F000 which is a symbolic link to /dev/sda1...only my user account cannot mount it...but ntfs-3g is built with suid use flag...which is supposed to allow local users to be able to use it to mount ntfs hdds...any ideas?? rebuilt ntfs-3g and didn't work either...

----------

## agent_jdh

I'm getting exactly the same problem here since ntfs3g was upgraded to 1.2216, so I'm guessing that this is a bug in that version, or that something has changed and the 'suid' USE flag isn't having the desired effect any more.  I'll maybe do some more digging and file a bug report if I don't find out what the cause is.  The partition can still be mounted by su'ing to root from a terminal, and accessed fine by a normal user.

As a side issue, KDE has started automatically trying to mount my external hdd partition when I power it on - before, it used to pop up a requester asking what I wanted to do (I preferred this).  Have no idea what has caused this change in behaviour, need to sit down and go through what's been updated recently.  I don't think it's ntfs3g related as my external hdd has 2 partitions, one ntfs, one ext3, and it automounts both of them without asking.

----------

## dpetka2001

i used to have the latest ntfs3g ~x86 in my system and it worked fine until 2 days ago...i downgraded to the latest stable version and everything works fine now...don't know what might have been changed in the latest unstable version...how can i see in the emerge.log what date each file was emerged?? all i get is a number in the beginning of each line which i don't understand what it means...thanks for your help...

----------

## agent_jdh

 *dpetka2001 wrote:*   

> i used to have the latest ntfs3g ~x86 in my system and it worked fine until 2 days ago...i downgraded to the latest stable version and everything works fine now...don't know what might have been changed in the latest unstable version...how can i see in the emerge.log what date each file was emerged?? all i get is a number in the beginning of each line which i don't understand what it means...thanks for your help...

 

According to my emerge.log, ntfs3g went from 1.2129 to 1.2216 on 20th Feb.  If you scroll up a bit from where ntfs3g appears in your log, you should see a line like this -

```
1203468579: Started emerge on: Feb 20, 2008 00:49:39
```

The number on the left is Unix time btw - it can be converted to 'normal' time.

http://www.onlineconversion.com/unix_time.htm

It might be worth masking 1.2216 in /etc/portage/package.mask as a temporary fix.

----------

## irgu

1.2216 fixed a local root exploit if ntfs3g is SUID. http://ntfs-3g.org/support.html#useroption2 says that the unprivileged user must have access rights to the partition and the mount point. This was not needed earlier.

Info found on http://ntfs-3g.org/releases.html and http://article.gmane.org/gmane.comp.file-systems.ntfs-3g.devel/418

----------

## dpetka2001

so what should be done in order to avoid such problems?? according to my /etc/fstab i posted a few posts above??

----------

## heoidasoulfly

I having troubles with my ntfs-3g driver too! I not quite sure but i think my problems came up with an Kernel-Upgrade from 2.6.23 to 2.6.24. Are there any knows bugs?

----------

## irgu

 *heoidasoulfly wrote:*   

> I having troubles with my ntfs-3g driver too! I not quite sure but i think my problems came up with an Kernel-Upgrade from 2.6.23 to 2.6.24. Are there any knows bugs?

 

Quote from the above linked ntfs-3g release note:

 *Quote:*   

> 
> 
> Thanks to our Gentoo users and Miklos Szeredi, it was found out recently 
> 
> that the FUSE kernel module used from the FUSE software packages (Gentoo 
> ...

 

----------

## dpetka2001

 *irgu wrote:*   

> 1.2216 fixed a local root exploit if ntfs3g is SUID. http://ntfs-3g.org/support.html#useroption2 says that the unprivileged user must have access rights to the partition and the mount point. This was not needed earlier.
> 
> Info found on http://ntfs-3g.org/releases.html and http://article.gmane.org/gmane.comp.file-systems.ntfs-3g.devel/418

 from what i've read from the links you mentioned 

```
- the user has access right to the volume 

   - the user has access right to the mont point 
```

my user has access rights to the mount point but how could i get my user to have access rights to the volume?? what do you mean by volume?? is it "/dev/sda1" for example?? how could i make sure that my user has access rights to the volume?? 

```
brw-rw---- 1 root disk 8, 1 2008-02-25 23:49 /dev/sda1
```

this is what i get from /dev/sda1...

----------

## fritzchen

anything new to this? i also get 

```
fritz@hermiod ~ $ ntfs-3g /dev/sda2 /mnt/local_share/

Error opening partition device: Permission denied

Failed to mount '/dev/sda2': Permission denied

Please check the volume and the ntfs-3g binary permissions,

and the mounting user ID. More explanation is provided at

http://ntfs-3g.org/support.html#unprivileged
```

using ntfs-3g 1.2216 on kernel 2.6.24

```
fritz@hermiod ~ $ ll /dev/fuse /dev/sda*

crw-rw-rw- 1 root root 10, 229  5. Mär 11:25 /dev/fuse

brw-rw---- 1 root disk  8,   0  5. Mär 11:25 /dev/sda

brw-rw---- 1 root disk  8,   1  5. Mär 11:25 /dev/sda1

brw-rw---- 1 root disk  8,   2  5. Mär 11:25 /dev/sda2

brw-rw---- 1 root disk  8,   3  5. Mär 11:25 /dev/sda3

brw-rw---- 1 root disk  8,   5  5. Mär 11:25 /dev/sda5

brw-rw---- 1 root disk  8,   6  5. Mär 11:25 /dev/sda6

brw-rw---- 1 root disk  8,   7  5. Mär 11:25 /dev/sda7
```

I already tried http://cvs.archlinux.org/cgi-bin/viewcvs.cgi/*checkout*/base/kernel26/fuse-2.6.24.patch?rev=HEAD&cvsroot=Core&only_with_tag=TESTING&content-type=text/plain

However, no luck mounting ntfs partitions.

Please help

Thanks in advance

----------

