LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 01-27-2008, 02:22 AM   #1
reakinator
Member
 
Registered: Oct 2005
Location: California
Distribution: Ubuntu Feisty
Posts: 52

Rep: Reputation: 15
ext3 external hd auto-mounted under root problem


Hello, I know this problem has to have been addressed before, but I cannot find record of it.

I have a lacie external usb harddrive that used to be formatted as fat32 until it had some bad sectors. At this point, I backed up the data and tried to reformat. mkfs.msdos did not allow me to format, but I was able to format the drive as ext3.

However, now when I plug the drive in, it is automounted under root instead of the current user. All the music and media on the drive can be accessed by using sudo, but this doesn't allow me to open the music using whatever programs I am running under the current user.

Does anyone know how to fix the automount settings so that Ubuntu mounts the driver under user?

regards,
rich
 
Old 01-27-2008, 02:32 AM   #2
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
not sure about Ubuntu, but what does /etc/auto.master show? What about /etc/fstab? How about the command 'mount' when you have your device plugged in?
 
Old 01-27-2008, 02:41 AM   #3
reakinator
Member
 
Registered: Oct 2005
Location: California
Distribution: Ubuntu Feisty
Posts: 52

Original Poster
Rep: Reputation: 15
I do not see /etc/auto.master

There is nothing in /etc/fstab about the drive, as I want it to automount when plugged into the usb slot.

Here is the output of mount:

r@pal:~$ mount
/dev/sda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.20-16-realtime/volatile type tmpfs (rw)
/dev/sda2 on /home type ext3 (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/sdb1 on /media/lacie type ext3 (rw,noexec,nosuid,nodev)

It is mounted under root at /media/lacie..
 
Old 01-27-2008, 05:12 PM   #4
Sidewinder1
LQ Newbie
 
Registered: Dec 2007
Location: PA., US
Distribution: ubuntu 7.10
Posts: 4

Rep: Reputation: 0
Try the following command in the terminal:
sudo chown -R <username:username> /media/lacie
 
Old 01-29-2008, 03:01 AM   #5
reakinator
Member
 
Registered: Oct 2005
Location: California
Distribution: Ubuntu Feisty
Posts: 52

Original Poster
Rep: Reputation: 15
SideWinder,

This tip works... but it would be nice to fix whatever is auto-mounting the drive so that it does not mount as root. I'm a little in the dark about what is controlling this in Debian/Ubuntu...

thanks,
rich
 
Old 01-29-2008, 03:32 PM   #6
Sidewinder1
LQ Newbie
 
Registered: Dec 2007
Location: PA., US
Distribution: ubuntu 7.10
Posts: 4

Rep: Reputation: 0
Quote:<This tip works... but it would be nice to fix whatever is auto-mounting the drive so that it does not mount as root. I'm a little in the dark about what is controlling this in Debian/Ubuntu...>

That is what the command chown with "username" is supposed to do; transfer ownership from root to your username. That way when it auotmounts you have read, write and execute privileges. Not sure about how to configure drives specifically not to mount. I just leave my Cavalry (Western guts), 500 Gig manually turned off unless I need it;

Last edited by Sidewinder1; 01-30-2008 at 05:01 AM.
 
Old 02-07-2008, 07:33 AM   #7
reakinator
Member
 
Registered: Oct 2005
Location: California
Distribution: Ubuntu Feisty
Posts: 52

Original Poster
Rep: Reputation: 15
Well it automounts correctly now, so thanks for the help. Not sure how it fixes whatever is scripting the mount process, but it works and that is what matters to me.

cheers..
rich
 
Old 02-07-2008, 08:29 AM   #8
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by reakinator View Post
Well it automounts correctly now, so thanks for the help. Not sure how it fixes whatever is scripting the mount process, but it works and that is what matters to me.

cheers..
rich
Um, just to be clear: The mount command can only be executed by "root," so the "automount" was, in fact, being correctly done. The chown command changed the permissions on the directories and files in the USB drive, and those permissions are what your system "looks" at when accessing the filesystem.

By default, if you don't set the permissions on an individual file or directory, permissions are inherited from the parent of the file or directory. Since you had not set any permissions on your USB file system, the "parent" was, of course, "root" so any file in the USB drive was owned by "root."

Another point: In a Linux system, automount is a system used to automatically attach file systems as they are needed. The auto.master file referred to by Micro420 is used to control that system. automount is primarily used to automatically access remote file systems. E.g., Windows shares, etc.

The GNOME desktop (and KDE) do not use automount to mount the USB drive when you plug it in. (That's done by udev, I believe.) So, when you said
Quote:
Does anyone know how to fix the automount settings so that Ubuntu mounts the driver under user?
Micro420 assumed that you were talking about the "real" automount command, not the "automatic mounting of a USB device" done by most desktop systems.
 
Old 02-08-2008, 03:30 AM   #9
reakinator
Member
 
Registered: Oct 2005
Location: California
Distribution: Ubuntu Feisty
Posts: 52

Original Poster
Rep: Reputation: 15
Very good to know, it makes sense to me now. Thank you for your help!

cheers,
rich
 
Old 03-09-2012, 01:14 PM   #10
kathirnk
LQ Newbie
 
Registered: Mar 2012
Posts: 1

Rep: Reputation: 0
automatic ntfs configuration worked for me.

https://help.ubuntu.com/community/Mo...dowsPartitions
 
Old 03-12-2012, 06:00 PM   #11
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
And what's the point of posting that to a thread from 2008?
 
  


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
ext3 (mounted) to lvm convert matters Slackware 1 05-29-2007 02:13 AM
Non-root users unable to write to auto mounted usb drive. andrew_cz Linux - Hardware 6 06-24-2006 12:47 PM
problem in mounting ext3 as rw to non-root users yumener Linux - Newbie 6 04-13-2006 02:18 PM
ext3 partition on external USB hard drive mounted, but only root access allowed leontini Linux - Hardware 4 02-17-2006 01:54 AM
Problem with Booting after creating ext3 partition on External USB ynyus75 SUSE / openSUSE 1 11-13-2005 02:23 PM

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

All times are GMT -5. The time now is 03:53 PM.

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