LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-16-2009, 04:48 PM   #1
601
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Rep: Reputation: 5
usb hdd not visible for other users


Hi

I have a usb external hdd which gets automounted each time I start the system. The mount point ubuntu creates is /media/55FF.. (more characters).

I created another user (part of plugdev group to access this drive) and it works only when one user is logged in. If the other user logs in and tries to access the hdd, a permission deny error occurs, although mount -v shows the disk as mounted: rw,nosuid,nodev,allow_other,default_permissions,blksize=4096

How can I have 2 (or more) users logged in, have access to this drive (and not only one of them) ?

EDIT: And to answer part of my question, doing an ls -l on /media shows that the mount point is owned only by the user which initially mounted this disk (nobody else has write or even read permissions on the drive) - which makes sense, however does anyone have any pointers as to how I can change that so that auto mounted usb disks have more permissive access rights ?

Last edited by 601; 12-16-2009 at 04:56 PM.
 
Old 12-16-2009, 04:56 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
Run the command
Code:
chmod -R 777 /media/<device name or number> (run as root if you are not the owner of the device)
That should do it.
 
Old 12-17-2009, 03:08 PM   #3
601
LQ Newbie
 
Registered: Dec 2009
Posts: 6

Original Poster
Rep: Reputation: 5
Hi Nexus,

and thanks for the reply. Unfortunately it didn't seem to do the trick. Although chmod appears to be working it doesn't change any permissions: I tried with owner and with sudo.

After some more researching I did find this information about udev through the forums. So what I did was to write a udev rule for this drive particularly (according to it's serial and manufacturer):
Code:
BUS=="usb", SYSFS{serial}=="55FF..", SYSFS{manufacturer}=="WD", NAME="%k", SYMLINK+="usbhdd0"
This has the effect of creating a device symlink under /dev called usbhdd0. The reason for this, as I understood, is to be able to locate the actual drive since this can show up at different locations such as /dev/sdb or /dev/sdc depending on other mounted usb devices.

Then in /etc/fstab I added this line to mount the drive at startup:
Code:
/dev/usbhdd0    /media/usbhdd0  ntfs rw,noexec,nosuid,user,auto 0 0
This uses the symlink provided by udev to mount the usb hdd at the specified location: /media/usbhdd0.

So far it worked and the only issue I couldn't figure was that if I disconnect the drive while logged in, the system does not mount it back upon reconnection. For this I need to reboot.
 
  


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
users not visible linuxguy08 Solaris / OpenSolaris 3 04-22-2008 01:59 PM
LDAP users not visible. Quiet1 Linux - Software 0 02-26-2007 08:00 PM
usb HDD (vfat) not visible fc6 vinster Linux - Hardware 18 01-21-2007 04:13 PM
Install directly to HDD from iso on HDD/USB, with out burning cd vivinuthappa DamnSmallLinux 7 11-16-2004 10:03 AM

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

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