LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-28-2012, 06:51 AM   #1
natharran
Member
 
Registered: Jul 2012
Location: Czech Republic
Distribution: Slackware64 14.1
Posts: 34

Rep: Reputation: Disabled
Question 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.

Last edited by natharran; 07-30-2012 at 06:12 PM. Reason: Solved
 
Old 07-29-2012, 03:59 AM   #2
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
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
 
Old 07-29-2012, 04:54 AM   #3
natharran
Member
 
Registered: Jul 2012
Location: Czech Republic
Distribution: Slackware64 14.1
Posts: 34

Original Poster
Rep: Reputation: Disabled
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.
 
Old 07-29-2012, 05:11 AM   #4
natharran
Member
 
Registered: Jul 2012
Location: Czech Republic
Distribution: Slackware64 14.1
Posts: 34

Original Poster
Rep: Reputation: Disabled
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.
 
Old 07-29-2012, 05:42 AM   #5
natharran
Member
 
Registered: Jul 2012
Location: Czech Republic
Distribution: Slackware64 14.1
Posts: 34

Original Poster
Rep: Reputation: Disabled
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.
 
Old 07-29-2012, 06:53 AM   #6
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
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.
 
Old 07-29-2012, 09:58 AM   #7
natharran
Member
 
Registered: Jul 2012
Location: Czech Republic
Distribution: Slackware64 14.1
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by allend View Post
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.
 
Old 07-29-2012, 10:34 AM   #8
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by natharran View Post
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 View Post
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
 
2 members found this post helpful.
Old 07-29-2012, 12:21 PM   #9
natharran
Member
 
Registered: Jul 2012
Location: Czech Republic
Distribution: Slackware64 14.1
Posts: 34

Original Poster
Rep: Reputation: Disabled
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? Fusermount -u works, of course, I'm just curious. Thank you .

And thank you all for your posts, I appreciate it .
 
Old 07-29-2012, 03:53 PM   #10
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Rep: Reputation: 233Reputation: 233Reputation: 233
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

.

Last edited by guanx; 07-30-2012 at 04:35 AM.
 
1 members found this post helpful.
Old 07-30-2012, 04:31 PM   #11
natharran
Member
 
Registered: Jul 2012
Location: Czech Republic
Distribution: Slackware64 14.1
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by guanx View Post
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.
 
  


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
Need Help, I unmounted external USB HDD, now will not mount thebrainman SUSE / openSUSE 3 12-14-2008 05:07 PM
Force External USB HDD to mount to certain folder predatorz Linux - Hardware 4 06-18-2008 11:26 AM
mount External HDD - USB ruwanindika Fedora 6 02-22-2008 08:10 AM
manual mount - external usb hdd (ubuntu) tripled2006 Linux - General 1 01-15-2007 10:08 AM
External USB HDD, mount problem, wierd behaviour. kniwor Slackware 5 08-18-2006 11:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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