SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2011-05-16 18:59:27

GrouchyGaijin
#! Member
From: Sweden
Registered: 2011-04-03
Posts: 58
Website

How can I mount my external hard drive as normal user - [SOLVED]

Hi Guys,

I have an external usb drive that I keep all my music on.  It shows up in the file explorer and I can choose to mount it as root.  I can't mount it as a normal user however.  When I try I get:

 
ntfs-3g-mount: user has no write access to mountpoint /media/usb0.

I'd like to mount the drive automatically when I login.  Does anyone know what I need to do?

Thank you.

Last edited by GrouchyGaijin (2011-05-17 03:13:45)


Thank you,

GG
Dell Inspiron 1520 - EeePC 1000H both single boot 100% Linux

Offline

Help fund CrunchBang, donate to the project!

#2 2011-05-16 19:10:41

Unia
#! Die Hard
From: The Netherlands
Registered: 2010-07-17
Posts: 3,176

Re: How can I mount my external hard drive as normal user - [SOLVED]

Is your user in the fuse group?
Also, what are the contents of /etc/fuse.conf?

EDIT: And to have it automount at boot, /etc/fstab is the file you want to edit. I don't edit that file (no need to) so I'll leave that to someone else. (anon, how's your tool called again? big_smile)

Last edited by Unia (2011-05-16 19:12:01)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
      Github || Deviantart

Offline

#3 2011-05-16 19:27:11

Armen138
Member
From: Laval, Quebec
Registered: 2011-04-23
Posts: 12
Website

Re: How can I mount my external hard drive as normal user - [SOLVED]

use pmount

Offline

#4 2011-05-16 20:48:17

GrouchyGaijin
#! Member
From: Sweden
Registered: 2011-04-03
Posts: 58
Website

Re: How can I mount my external hard drive as normal user - [SOLVED]

Unia wrote:

Is your user in the fuse group?
Also, what are the contents of /etc/fuse.conf?

EDIT: And to have it automount at boot, /etc/fstab is the file you want to edit. I don't edit that file (no need to) so I'll leave that to someone else. (anon, how's your tool called again? big_smile)

Thank you for the reply.

Yes I am a member of the fuse group.

The fuse.conf file seems to be entirely commented out:

# Set the maximum number of FUSE mounts allowed to non-root users.
# The default is 1000.
#
#mount_max = 1000

# Allow non-root users to specify the 'allow_other' or 'allow_root'
# mount options.
#
#user_allow_other

The line for the usb drive in fstab looks like this:

/dev/sdb1       /media/usb0     auto    usb,rw,user,noauto  0       0

I added the group usb and then added myself to that group.

This may be a moot point because right after I posted my question I wondered what would happen if I just used chmod on the drive.  It seems to have worked because now I can mount it as a normal user.  Is there a problem with doing it that way?


Thank you,

GG
Dell Inspiron 1520 - EeePC 1000H both single boot 100% Linux

Offline

#5 2011-05-16 21:09:48

Val_B
#! CrunchBanger
From: SE United States
Registered: 2010-01-25
Posts: 238

Re: How can I mount my external hard drive as normal user - [SOLVED]

FWIW my fuse.conf is all commented out and I have no entries in fstab aside from my hard drive and dolphin still automounts new media just fine. I am not sure exactly how it does it (KDE programs run on voodoo sometimes I swear) but at least I know there are ways around those files.

Also, you could use blkid to reference your fstab through UUID, I am not a huge fan of UUID as I think it can complicate some things, but when it comes to removable drives, especially ones that may require different options I prefer it.

Last edited by Val_B (2011-05-16 21:10:28)

Offline

#6 2011-05-17 00:37:28

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 9,255

Re: How can I mount my external hard drive as normal user - [SOLVED]

What filesystem is on the USB drive?  FAT32 & NTFS mount automatically as read/write, but extN auto-mounts in read only...


while ( ! ( succeed = try() ) );
We've earned a reputation as a nice, friendly community; please help us keep it that way.

Offline

#7 2011-05-17 01:27:46

anonymous
The Mystery Member
From: Arch Linux Forums
Registered: 2008-11-29
Posts: 8,930

Re: How can I mount my external hard drive as normal user - [SOLVED]

GrouchyGaijin wrote:

This may be a moot point because right after I posted my question I wondered what would happen if I just used chmod on the drive.  It seems to have worked because now I can mount it as a normal user.  Is there a problem with doing it that way?

Well if this problem is solved for you, kindly edit your first post and add [SOLVED] to the title smile


Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Offline

#8 2012-07-30 21:39:12

5t3cc0
Member
Registered: 2012-07-09
Posts: 26
Website

Re: How can I mount my external hard drive as normal user - [SOLVED]

I have the same problem.. I've tried to follow the instruction but It seems that the command chmod does not work for me, I've also tried to follow what user becker did in this thread http://crunchbanglinux.org/forums/topic … tfs-drive/ but the problem is persisting... this is my fstab file

# /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/sda1 during installation
UUID=1a35bc41-d219-4a58-a4ff-6aa3f0a70004 /               ext4    errors=remount-ro 0       1
# /home was on /dev/sda6 during installation
UUID=c6ac2beb-9cb8-4bb6-9bf8-75c8ec4bf833 /home           ext4    defaults,user_xattr        0       2
# swap was on /dev/sda5 during installation
UUID=58299d60-a93e-45ad-ba0d-5d00b3a2de87 none            swap    sw              0       0
/dev/sdb1       /media/usb0     auto    rw,user,noauto  0       0

Any suggest? It's really unpleasing watch movies and listen to music as root user.. sad


stat rosa pristina nomine, nomina nuda tenemus

Offline

#9 2012-07-30 21:44:38

pidsley
#! Die Hard
Registered: 2012-05-23
Posts: 1,442

Re: How can I mount my external hard drive as normal user - [SOLVED]

5t3cc0 wrote:

I have the same problem.. I've tried to follow the instruction but It seems that the command chmod does not work for me

What do you mean "doesn't work for you"? What did you try (the exact command, please), and what errors (if any) did you receive?

/dev/sdb1       /media/usb0     auto    rw,user,noauto  0       0

So sdb1 is your usb drive, and you're mounting it at /media/usb0? Does it mount successfully at boot? What do these commands tell you:

ls -l /media
ls -l /media/usb0

Last edited by pidsley (2012-07-30 21:45:06)


Want Waldorf, but with sid and systemd? Try Darkside.

Offline

#10 2012-07-30 23:49:28

5t3cc0
Member
Registered: 2012-07-09
Posts: 26
Website

Re: How can I mount my external hard drive as normal user - [SOLVED]

Excuse my poor accuracy, i've tried

 sudo chmod 666 /media/usb0

and now when i put in the USB drive my HD I get

ntfs-3g-mount: failed to chdir to mountpoint: Permission denied.

I've tried also the commands you suggest to me and this is the output for ls -l /media

total 8
drwxr-xr-x 2 root root 4096 26 lug 15.05 cdrom
lrwxrwxrwx 1 root root    4 26 lug 15.04 usb -> usb0
drw-rw-rw- 2 root root 4096 26 lug 15.04 usb0

and this one for  ls -l /media/usb0

total 0

Last edited by 5t3cc0 (2012-07-31 01:01:29)


stat rosa pristina nomine, nomina nuda tenemus

Offline

#11 2012-07-30 23:59:02

pidsley
#! Die Hard
Registered: 2012-05-23
Posts: 1,442

Re: How can I mount my external hard drive as normal user - [SOLVED]

OK, so let's start over. You're talking about an external USB drive right? If it's an internal drive we can use a different procedure, but the first few steps are the same.

Delete the mount point you made and make a new one:

sudo rmdir /media/usb0
sudo rmdir /media/usb
sudo mkdir /media/usb

Delete the line from your fstab that ws supposed to automount the drive.

Reboot.

Now do this again:

ls -l /media/usb

If you are talking about an internal drive, STOP at this point, and tell me what you get from the "ls" command.

If it's an external drive, proceed. Install the "pmount" package:

sudo apt-get install pmount

Plug in the usb drive, and run this command:

pmount /dev/sdb /media/usb

Now do this again:

ls -l /media/usb

And tell me what you get.

Last edited by pidsley (2012-07-31 00:03:03)


Want Waldorf, but with sid and systemd? Try Darkside.

Offline

#12 2012-07-31 07:37:27

rhowaldt
#!*$%:)
Registered: 2011-03-09
Posts: 4,396

Re: How can I mount my external hard drive as normal user - [SOLVED]

follow pidsley to the letter. in your spare time, read here for some more info: http://crunchbanglinux.org/forums/topic … al-drives/

Offline

#13 2012-07-31 12:18:20

5t3cc0
Member
Registered: 2012-07-09
Posts: 26
Website

Re: How can I mount my external hard drive as normal user - [SOLVED]

pidsley wrote:

OK, so let's start over. You're talking about an external USB drive right? If it's an internal drive we can use a different procedure, but the first few steps are the same.

Delete the mount point you made and make a new one:

sudo rmdir /media/usb0
sudo rmdir /media/usb
sudo mkdir /media/usb

Delete the line from your fstab that ws supposed to automount the drive.

Reboot.

Now do this again:

ls -l /media/usb

If you are talking about an internal drive, STOP at this point, and tell me what you get from the "ls" command.

If it's an external drive, proceed. Install the "pmount" package:

sudo apt-get install pmount

So far so good, except that sudo rmdir /media/usb is not working, the output is that /media/usb isn't a directory, so I removed it with rm. That seems to have worked.

pidsley wrote:

Plug in the usb drive, and run this command:

pmount /dev/sdb /media/usb

Strange things begin now. This is the output of the command, but now I can access my hd as a normal user!

stecco@latitude-D400:~$ pmount /dev/sdb /media/usb
NTFS signature is missing.
Failed to mount '/dev/sdb': Invalid argument
The device '/dev/sdb' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
NTFS signature is missing.
Failed to mount '/dev/sdb': Invalid argument
The device '/dev/sdb' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
Errore: impossibile cancellare il punto di mount: No such file or directory

What's happened? And how these problems were never placed with the usb-keys?

rhowaldt wrote:

follow pidsley to the letter. in your spare time, read here for some more info: http://crunchbanglinux.org/forums/topic … al-drives/

I've looked for something like that page but I didn't found it, i've search from the forum's search-bar looking for someone had my same problem..
Thank u all guys for the replies!!


stat rosa pristina nomine, nomina nuda tenemus

Offline

#14 2012-07-31 13:03:53

hinto
#! Die Hard
From: Cary, NC
Registered: 2010-12-08
Posts: 1,069

Re: How can I mount my external hard drive as normal user - [SOLVED]

^ I know you marked it solved, but if you are mounting in /etc/fstab, I'd suggest using the UUID of you external drive, rather than say, /dev/sdb1.  That way you set set permissions, etc for only that drive and not say another usb drive you stick in that might want to take /dev/sdb1.
-Hinto


"Sometimes I wish I hadn't taken the red pill" -Me

Offline

#15 2012-07-31 14:34:23

pidsley
#! Die Hard
Registered: 2012-05-23
Posts: 1,442

Re: How can I mount my external hard drive as normal user - [SOLVED]

5t3cc0 wrote:

What's happened? And how these problems were never placed with the usb-keys?

The usb keys were probably not formatted as ntfs. We can fix this, but right now I need more information. With the usb drive plugged in, type these commands and tell me what you get:

ls -l  /media
sudo blkid

Want Waldorf, but with sid and systemd? Try Darkside.

Offline

#16 2012-07-31 17:35:19

5t3cc0
Member
Registered: 2012-07-09
Posts: 26
Website

Re: How can I mount my external hard drive as normal user - [SOLVED]

stecco@latitude-D400:~$ ls -l  /media
totale 8
drwxr-xr-x 2 root root 4096 26 lug 15.05 cdrom
drwxr-xr-x 2 root root 4096 31 lug 13.43 usb

And this is the output with the hd attached on

stecco@latitude-D400:~$ ls -l  /media
totale 16
drwxr-xr-x 2 root   root 4096 26 lug 15.05 cdrom
drwx------ 1 stecco root 8192 13 lug 21.23 steccoHD
drwxr-xr-x 2 root   root 4096 31 lug 13.43 usb
stecco@latitude-D400:~$ sudo blkid
[sudo] password for stecco: 
/dev/sda1: UUID="1a35bc41-d219-4a58-a4ff-6aa3f0a70004" TYPE="ext4" 
/dev/sda5: UUID="58299d60-a93e-45ad-ba0d-5d00b3a2de87" TYPE="swap" 
/dev/sda6: UUID="c6ac2beb-9cb8-4bb6-9bf8-75c8ec4bf833" TYPE="ext4" 
/dev/sdb1: LABEL="steccoHD" UUID="22ACA261ACA22F6B" TYPE="ntfs"

But I don't want annoying you Pidsley, now all the devices are working so It's only for my curiosity!

hinto wrote:

^ I know you marked it solved, but if you are mounting in /etc/fstab, I'd suggest using the UUID of you external drive, rather than say, /dev/sdb1.  That way you set set permissions, etc for only that drive and not say another usb drive you stick in that might want to take /dev/sdb1.
-Hinto

I'm sorry but I don't have any idea about what UUID means and I mess up with /etc/fstab without understanding what I was really doing, so I can't really understand your tip!


stat rosa pristina nomine, nomina nuda tenemus

Offline

#17 2012-07-31 17:45:33

hinto
#! Die Hard
From: Cary, NC
Registered: 2010-12-08
Posts: 1,069

Re: How can I mount my external hard drive as normal user - [SOLVED]

@5t3cc0 How To Use UUID To Mount Partitions / Volumes Under Ubuntu Linux

It's written for Ubuntu, but it will apply to #!.
-Hinto


"Sometimes I wish I hadn't taken the red pill" -Me

Offline

#18 2012-07-31 18:30:30

pidsley
#! Die Hard
Registered: 2012-05-23
Posts: 1,442

Re: How can I mount my external hard drive as normal user - [SOLVED]

5t3cc0 wrote:

But I don't want annoying you Pidsley, now all the devices are working so It's only for my curiosity!

You're not annoying me. I like answering questions; I learn new things too.

I told you to do this:

pmount /dev/sdb /mnt/usb

But it looks like the drive is actually one big partition, so try this instead:

pmount /dev/sdb1 /mnt/usb

(notice that's sdb1 not just sdb)

and let me know if the errors go away.

Before you unplug the drive, you should also do this:

sync
pumount /mnt/usb

I would leave fstab alone for now if I were you. As long as you can use pmount when you need to access the drive, that's good enough in my opinion.

You can try messing with fstab after you learn a little more about Linux.

Last edited by pidsley (2012-07-31 18:31:12)


Want Waldorf, but with sid and systemd? Try Darkside.

Offline

#19 2012-07-31 19:50:33

5t3cc0
Member
Registered: 2012-07-09
Posts: 26
Website

Re: How can I mount my external hard drive as normal user - [SOLVED]

stecco@latitude-D400:~$ pmount /dev/sdb1 /mnt/usb
Errore: '/' non deve comparire nel nome dell'etichetta

I think it means something like Error: '/' must not occur in the label name

stecco@latitude-D400:~$ sync
stecco@latitude-D400:~$ pumount /mnt/usb
Errore: impossibile determinare il percorso effettivo del dispositivo: No such file or directory

The translation should be Error: Unable to determine the actual location of the device: No such file or directory

But i want to notice you that I think I don't need to use pmount to access the drive, now just when I insert the usb cable I can open the drive with thunar without doing anything else..

@hinto:
I've tried to take a look but seems a little too difficult.. Now all works, so I'll read the page you suggested and the other that rhowaldt suggested to when I'll have some spare time and after I learn a little more about Linux (as pidsley said for fstab)! Thank you hinto for the hint, however!


stat rosa pristina nomine, nomina nuda tenemus

Offline

#20 2012-07-31 20:03:57

pidsley
#! Die Hard
Registered: 2012-05-23
Posts: 1,442

Re: How can I mount my external hard drive as normal user - [SOLVED]

Hm, well OK, I'm not sure why it works now, but I'm glad it does... smile


Want Waldorf, but with sid and systemd? Try Darkside.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo