Solved

external ntfs drive cannot be mounted automatically in OpenSuse

Posted on 2011-09-24
12
510 Views
Last Modified: 2012-05-12

When I boot up opensuse 11.4 with my externall NTFS drive already plugged into the USB slot, opensuse detects it and mounts it automatically. And I can access its files. But when I plugged in the drive at any other time, the device is detected, but cannot be mounted. I can see the external drive in the Dolphin file explorer, but when I click the device, it displays the error:

Error opening /dev/sdc1: Permission denied
Failed to mount /dev/sdc1: Permission denied
Please check /dev/sdc1 and the ntfs-3g binary permissions
and the mounting user ID.

I searched the internet for advise, but all fails. What do I do next?

Thanks in advance for the help.
0
Comment
Question by:JeanLeFrancais
  • 5
  • 3
  • 2
  • +2
12 Comments
 
LVL 21

Accepted Solution

by:
Papertrip earned 500 total points
ID: 36594112
Sounds like you are trying to mount it as a non-root user.

Try this:
su or sudo to root,
mount -t ntfs /dev/sdc1 /mntpoint

Open in new window

0
 

Author Comment

by:JeanLeFrancais
ID: 36594195
Papertrip,

That command worked beautifully. Isn't there a way to automate this so that when I plug the external drive in, the command will be triggered without me having to issue it?

0
 
LVL 13

Expert Comment

by:themrrobert
ID: 36594204
0
 
LVL 13

Expert Comment

by:themrrobert
ID: 36596096
Were you able to get it working using the fix i sent you?

From the sound of it, I believe you have enough linux experience to make it work for you.

Best of luck :D
0
 

Author Comment

by:JeanLeFrancais
ID: 36596197
Themrrobert:

No, I couldn't get the info from that link to work. I noticed that the device name changes, if seems, everytime that I plug the USB external HD. It was /dev/sdc1 yesterday. Today, it maps to /dev/sdd1. So it is impossible to hard-code the mapping into that auto.misc file when it changes all the time. For now, I will accept Paperclip's solution:

mount -t ntfs /dev/sdc1 /mntpoint

unless you have some other automount trick in mind. It would be great to make that automount to work.
0
 
LVL 9

Expert Comment

by:bz43
ID: 36596255
Just curious.  Would you mind running
$ cat /etc/fstab 

Open in new window


I want to see if you are using UUID's
If you're using UUID's we can use that in fstab to automount.

Here is one of my fstabs,
$ cat /etc/fstab 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sda2 during installation
UUID=f13fe524-b8ae-4f35-8831-9ba9e9db2dfa /               ext4    errors=remount-ro 0       1
# /home was on /dev/sdb1 during installation
UUID=0f24fae1-135c-4750-9928-4632e2f04f45 /home           ext4    defaults        0       2
# /wd500 was on /dev/sdc1 during installation
UUID=1fba7d0c-e82c-4837-b1bd-6192d7dd3f88 /wd500          ext4    rw,user,exec        0       2
# /wdgiga was on /dev/sdc3 during installation
UUID=3baa432d-3480-402d-8df3-1b90dbc5f655 /wdgiga         ext4    rw,user,exec        0       2
# /wdtera was on /dev/sdc2 during installation
UUID=9a762875-5e0d-4edf-8bdd-8aaaea6403d5 /wdtera         ext4    rw,user,exec        0       2
# /xtraSpace was on /dev/sda3 during installation
UUID=654d5c57-129b-4e06-92f1-673a8b4bcf56 /xtraSpace      ext4    defaults        0       2
# swap was on /dev/sda1 during installation
UUID=f7fc69af-d475-44f1-87dd-63eb8ca0b7ed none            swap    sw              0       0
/dev/scd1       /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/scd0       /media/cdrom1   udf,iso9660 user,noauto     0       0
#/dev/sdc1       /media/usb0     auto    rw,user,noauto  0       0
#/dev/sdc2       /media/usb1     auto    rw,user,noauto  0       0
#/dev/sdc3       /media/usb2     auto    rw,user,noauto  0       0

Open in new window

0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:JeanLeFrancais
ID: 36596778
bz43:

Here's my fstab file:
 fstab
0
 
LVL 9

Expert Comment

by:bz43
ID: 36599610
I don't have access to opensuse 11.4 at the moment so not sure if this will work.  

I'm not sure why your system doesn't automatically remount the WD My Book with your current fstab using the disk’s ID (symlinks in /dev/disk/by-id/).  Maybe it will work if you leave the device plugged in all the time.  And, maybe it doesn't work when you unplug the device and plug it in using the same or different USB port.  Not sure.

So, maybe try using the filesystem’s UUID (/dev/disk/by-uuid/)?

Can you run the blkid command?
$ /sbin/blkid 

Open in new window


You'll see several lines but I'm interested in the one for your My Book. Unfortunately I don't have an opensuse 11.4 with a setup so I can't give you exact code.  You might see something like:
/dev/sda1: UUID="A248A12348A0F6E7" LABEL="System" TYPE="ntfs" 

Open in new window


If possible, edit your fstab using the UUID for your USB WD My Book external ntfs hard disk.  The "#" should remark out that line.  Substitute your Western Digital My Book UUID for "A248A12348A0F6E7":
  
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part5 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part6 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part7 /home                ext4       acl,user_xattr        1 2
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part2 /windows/C           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part3 /windows/D           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
#/dev/disk/by-id/usb-WD_My_Book_1140_574341563555313335393232-0:0-part1 /windows/E           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
#/dev/disk/by-id/usb-WD_My_Book_1140_574341563555313335393232-0:0-part1 /windows/E           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
/dev/disk/by-uuid/A248A12348A0F6E7 /windows/E	ntfs-3g	users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0           

Open in new window



0
 
LVL 9

Expert Comment

by:bz43
ID: 36599626
Sorry the last code should be:
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part5 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part6 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part7 /home                ext4       acl,user_xattr        1 2
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part2 /windows/C           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
/dev/disk/by-id/ata-WDC_WD7500BPVT-22HXZT1_WD-WX81A41A0905-part3 /windows/D           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
#/dev/disk/by-id/usb-WD_My_Book_1140_574341563555313335393232-0:0-part1 /windows/E           ntfs-3g    users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
/dev/disk/by-uuid/A248A12348A0F6E7 /windows/E	ntfs-3g	users,gid=users,fmask=133,dmask=022,locale=fr_FR.UTF-8 0 0
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

Open in new window


0
 
LVL 2

Expert Comment

by:KishorDas
ID: 36707805
rather use the command ntfs-3g to mount the ntfs file system.

Thanks
Kishor Kumar Das
0
 

Author Comment

by:JeanLeFrancais
ID: 36713969
Folks,

Thanks for all the advises, but all seem to fail. I decided to accept Paperclip's solution:
mount -t ntfs /dev/sdc1 /mntpoint

because it works, although it doesn't solve the automount solution I sought.
0
 

Author Closing Comment

by:JeanLeFrancais
ID: 36713976
The command works, although it doesn't solve the automount of the external hard drive. Thanks for the help.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Solid State Drive Performance Tips: Solid state storage technology is now a standard.  After testing and using several different brands and revisions of SSD's over the years I have put together a collection of tips,tools and suggestions that I ha…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now