LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   KDE does not mount USB external HDD (https://www.linuxquestions.org/questions/slackware-14/kde-does-not-mount-usb-external-hdd-4175419060/)

natharran 07-28-2012 06:51 AM

KDE does not mount USB external HDD
 
Hi guys,

I'm running Slackware 13.37 x64 and I'm having problem mounting my NTFS USB 3.0 external harddrive. I searched both this forum and web in general but found no solutions so far, so I'd like to ask you.

When I connect my device, it's presented by KDE, but when I click the mount button, it just says "Could not mount the following device: my_disk_name". I can, however, mount it directly via command line with no problem by
Code:

mount -t ntfs-3g /dev/sdb1 /mnt/tmp
I then tried to edit the fstab and add this line
Code:

/dev/sdb1    /mnt/tmp      ntfs-3g      noauto,user,rw    1    0
That didn't work either. I also tried to change the "ntfs-3g" to simple "ntfs" with no success whatsoever.

Now, you're probably going to mention this trick of creating a symbolic link in /sbin
Code:

ln -s /bin/ntfs-3g mount.ntfs
Already tried, didn't help.

I should probably tell you I'm running 3.4.6 kernel, but I used an oldconfig and made no changes to device drivers (didn't try to connect the device before kernel upgrade). But since I can mount the device manually I guess that's not the problem.

Well, that's all I can tell you. Could you please tell me what the **** am I missing?

Thanks a mil.

samac 07-29-2012 03:59 AM

Hi, welcome to Slackware on LinuxQuestions.

If you can mount from the command line it suggests that it is a detection problem rather than a mount problem. Sometimes if I have an external usb hdd device attached it may not be detected when the KDE loads but if I unplug and plug it back in then it connects no problem.


samac

natharran 07-29-2012 04:54 AM

Hi samac,

thank you for your reply, but my problem seems to be elsewhere. I don't have the disk attached when KDE starts, I usually attach it later. As I described above, it IS detected by KDE, it pops the "Available devices" dialog in right lower corner of the screen. But if I want to actually mount it via KDE (the "mount" button it the "Available devices" dialog), it refuses to do so. The only error I get is "Could not mount the following device: my_disk_name".

I tried this with two different disks using all the USBs in my computer. I unplugged and plugged them several times, but the error remains. These disks work fine with both Windows and openSUSE, even at the same computer.

Since I can mount it manually via command line, I think it must be some misconfiguration of my KDE. But I only changed it's theme, the rest is "out of the box".

Any other ideas? Thanks again.

natharran 07-29-2012 05:11 AM

Hi again,

I may have another hint, it seems to be a permission problem. After I attach my disk to the computer I can see it in Dolphin. When I try to enter it, the following message appears:

Code:

An error occurred while accessing 'my_disk_name', the system responded: ntfs-3g-mount: mount failed: Operation not permitted
User doesn't have privilege to mount. For more information
please see: http://ntfs-3g.org/support.html#unprivileged

Two things confuse me now. First - how can I be not permitted to mount? I declared a "user" parameter in fstab. Second - the ntfs-3g.org website doesn't exist, it just redirects me to some tuxera web, so I didn't get any info from there.

natharran 07-29-2012 05:42 AM

Solved ... but is it good?
 
Well I solved it, at least temporarily, by editing permissions of ntfs-3g itself

Code:

chmod u+s /bin/ntfs-3g
so the current permissions are -rwsr-xr-x

...but I'm not sure that's a good solution. I don't know if I'm not messing with security by this.

What do you think?

Thanks.

allend 07-29-2012 06:53 AM

Quote:

/dev/sdb1 /mnt/tmp ntfs-3g noauto,user,rw 1 0
Try 'users' in place of 'user' in the /etc/fstab entry.
You should not need to set the sticky bit on ntfs-3g.

natharran 07-29-2012 09:58 AM

Quote:

Originally Posted by allend (Post 4740500)
Try 'users' in place of 'user' in the /etc/fstab entry.
You should not need to set the sticky bit on ntfs-3g.

Hi,

thanks for the tip, but I've read the fstab manual and tried it before. I tried it again now (unset the sticky bit and edited 'user' to 'users' in fstab) but it's not working. So far, the only working solution is the sticky bit. And I also needed to change the mount point to another directory, because Doplhin said I had no write permission in /mnt/tmp.

Which leads me to another question - my /bin/ntfs-3g now has the -rwsr-xr-x permissions. Those are exactly the same permissions as /bin/mount and /bin/umount (out of the box, I didn't change them). All of these are owned by root:root. And yet, I can use the "ntfs-3g" from my user account with no problem, but "mount" and "umount" say "Only root can do that". Where is that set? That might also solve my problem.

Thank you.

guanx 07-29-2012 10:34 AM

Quote:

Originally Posted by natharran (Post 4740481)
Well I solved it, at least temporarily, by editing permissions of ntfs-3g itself

Code:

chmod u+s /bin/ntfs-3g
so the current permissions are -rwsr-xr-x

...but I'm not sure that's a good solution. I don't know if I'm not messing with security by this.

What do you think?

Thanks.

Basically you were not running -current. See ChangeLog:
Code:

Mon Jul 16 19:00:08 UTC 2012
a/ntfs-3g-2012.1.15-x86_64-2.txz:  Rebuilt.
  Made /bin/ntfs-3g setuid root, because otherwise it refuses to allow
  non-root users to mount volumes now, even if /etc/fstab allows it.


Quote:

Originally Posted by natharran (Post 4740592)
Hi,

thanks for the tip, but I've read the fstab manual and tried it before. I tried it again now (unset the sticky bit and edited 'user' to 'users' in fstab) but it's not working. So far, the only working solution is the sticky bit. And I also needed to change the mount point to another directory, because Doplhin said I had no write permission in /mnt/tmp.

Which leads me to another question - my /bin/ntfs-3g now has the -rwsr-xr-x permissions. Those are exactly the same permissions as /bin/mount and /bin/umount (out of the box, I didn't change them). All of these are owned by root:root. And yet, I can use the "ntfs-3g" from my user account with no problem, but "mount" and "umount" say "Only root can do that". Where is that set? That might also solve my problem.

Thank you.

fusermount -u

natharran 07-29-2012 12:21 PM

Quote:

Mon Jul 16 19:00:08 UTC 2012
a/ntfs-3g-2012.1.15-x86_64-2.txz: Rebuilt.
Made /bin/ntfs-3g setuid root, because otherwise it refuses to allow
non-root users to mount volumes now, even if /etc/fstab allows it.
Thank you :)

Quote:

fusermount -u
I don't understand - how does that answer my question about being able to use the ntfs-3g but not the mount and umount from my user account although they have exactly the same permissions and ownership? :confused: Fusermount -u works, of course, I'm just curious. :) Thank you :).

And thank you all for your posts, I appreciate it :).

guanx 07-29-2012 03:53 PM

Because Filesystem in User SpacE (FUSE) works differently from internal filesystems. The details I've not studied. But using fusermount is the way it's supposed to work. And I'm not going to figure out why the way it's not supposed to work does not work unless really necessary.

BTW, in "/proc/mounts" you can see the mount options of currently mounted filesystems. Pay attention to the "uhelper" option. This one helps the proper unprivileged user to un-mount the filesystem using umount.

man umount

.

natharran 07-30-2012 04:31 PM

Quote:

Originally Posted by guanx (Post 4740793)
Because Filesystem in User SpacE (FUSE) works differently from internal filesystems. The details I've not studied. But using fusermount is the way it's supposed to work. And I'm not going to figure out why the way it's not supposed to work does not work unless really necessary.
.

Thank you. I thought they both do the same thing (because the result seems the same). Didn't know they operate differently.


All times are GMT -5. The time now is 10:04 PM.