UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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)
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...
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.
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.
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?
Micro420assumed that you were talking about the "real" automount command, not the "automatic mounting of a USB device" done by most desktop systems.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.