LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 07-13-2005, 10:37 AM   #1
denis1314
LQ Newbie
 
Registered: Nov 2003
Location: Geneva
Distribution: suse
Posts: 17

Rep: Reputation: 1
Only root access to automounted USB drive


Hi All,

I use a SUSE 9.3 distribution that has hotplug installed. When I plug an external Hard Disk, I have only ready only user access and read write access as root.

changing the parameters in the file /etc/sysconfig/hotplug does not help:

HOTPLUG_DO_MOUNT="manual"
HOTPLUG_MOUNT_TYPE="fstab"
HOTPLUG_USE_SUBFS="no"

even if there are the correct param in the fstab file:

/dev/sdg1 /media/usbdisk subfs rw,noauto,users,sync,fs=ext3 0 0
/dev/sdg2 /media/usbdisk_1 subfs rw,noauto,users,sync,fs=reiserfs 0 0

BUT if the filesystem on the USB disk is FAT32 I get a rw access to this !!
reading the /etc/mtab show that the submountd does not seem to take into account my fstab

suggestions ??

Many thanks

Denis Dupont
Geneva
 
Old 07-13-2005, 11:09 AM   #2
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
when you figure that out, please let me know. i have the same issue with debian on the 2.6.11 kernel. i have rw permissions in my /etc/fstab, but it does not matter only root has those permissions and it still gives me plenty of error msg, but does what i tell it to do.

user can not to squat other then read my USBstick.
 
Old 07-13-2005, 11:20 AM   #3
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
remove the 's' from 'users' in both lines
 
Old 07-13-2005, 12:02 PM   #4
denis1314
LQ Newbie
 
Registered: Nov 2003
Location: Geneva
Distribution: suse
Posts: 17

Original Poster
Rep: Reputation: 1
Only root access to automounted USB drive

submountd tends to replace mountd I suppose for the main Linux distributors. see submount.sourceforge.net/ to check that I correctly understood this. That means changing interpretation of fstab file (noauto,umask .... not processed anymore)
The new option procuid does not help

the option user and users are different but not usefull with this new interpretation of fstab.

the thread will stay open !

thanks

Denis
 
Old 07-13-2005, 12:17 PM   #5
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
I weren't threatening to close your thread!

I know the two options are different, I'm not exactly sure how 'users' work but I know 'user' will make all the files owned by the user that mounts the device aswell as allowing a normal user to mount/umount that device

Oh, and do you know for sure that the option 'rw' does have an affect if others like 'users' don't? I don't have much knowledge about mountd and submountd to be able to be able to help much further, sorry

Last edited by phil.d.g; 07-13-2005 at 12:19 PM.
 
Old 07-13-2005, 12:44 PM   #6
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
here is my line in /etc/fstab and it does not alow users to mount and once root mounts users can only read not write to my USB stick

Code:
/dev/sda1       /mnt/USBdrive   auto    user,rw,noauto  0       0
do i goof on that line?
 
Old 07-13-2005, 12:45 PM   #7
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
also once you make a change to fstab, do you have to reboot for it to take effect or is there an other way around that like restarting some service?
 
Old 07-13-2005, 03:03 PM   #8
denis1314
LQ Newbie
 
Registered: Nov 2003
Location: Geneva
Distribution: suse
Posts: 17

Original Poster
Rep: Reputation: 1
I changed my fstab and saw the results on mtab after having unplugged and replugged the USB disk.
It seems that the kernel ( chkconfig --list | grep mount shows nothing) calls submountd which is an executable located in /sbin.

hope to discuss later
Thanks
Denis
 
Old 07-16-2005, 03:40 PM   #9
Lleb_KCir
Senior Member
 
Registered: Nov 2003
Location: Orlando FL
Distribution: Debian
Posts: 1,765

Rep: Reputation: 45
well could not get auto mounter to work, but i was successful at getting user to mount/umount my USB stick so i am happy enough for now.
 
Old 07-16-2005, 04:04 PM   #10
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 40
You should never have to reboot for changed settings in fstab to take effect, unless they apply to a drive that can't be unmounted. A drive can only be (safely) unmounted when it is not being used [see fuser(1)]. That said, when you plug in your USB stick, the hotplugger sees a new device, which registers as something like usb-mass-storage. If necessary, appropriate kernel modules are loaded, and the automounter daemon (tipped off by the hotplugger that something is going on) checks the kernel-assigned drive designation against fstab to find out how it should be mounted. I think that's more or less how it works. But fstab changes will take effect on the next mount, regardless.
 
Old 07-19-2005, 02:06 AM   #11
denis1314
LQ Newbie
 
Registered: Nov 2003
Location: Geneva
Distribution: suse
Posts: 17

Original Poster
Rep: Reputation: 1
I've found a solution for me:
Formatting the external disk with FAT32 makes it writable with automount. In other words, if I connect a CFcard or an external hard disk formatted ext3 I have a user read only access and a read/write root access, but without changing anything else, when I reformat my CFCARD or HD with FAT, I get a user read/write access. So I keep the FAT32 filesystem on my external HD.

Hope it will be usefull for you also

Denis
 
Old 07-19-2005, 09:01 AM   #12
bglnelissen
Member
 
Registered: Feb 2004
Location: Utrecht Holland
Distribution: Fedora, Debian, Mandrake, OSX, OpenBSD
Posts: 76

Rep: Reputation: 15
Quote:
Originally posted by Lleb_KCir
also once you make a change to fstab, do you have to reboot for it to take effect or is there an other way around that like restarting some service?
Code:
# umount -a
for unmounting everything. (it will not unmount the disks that are in use)

Code:
# mount -a
for mounting the whole fstab file in /etc/fstab.

so for the fstab file to take effect just type:
Code:
# umount -a;mount -a
greetings.

bas


(i have the same problem (thread) but changing filesystem ain't an option. so i am still looking for the RIGHT answer.)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Non-root write access to a USB drive (ext2) ?? jmborr Linux - Hardware 4 10-17-2005 02:38 PM
How do I make it so regular users can access an automounted floppy? mugwump84 Linux - Newbie 4 04-02-2005 11:43 PM
when I mount my usb hard drive, I have to be root to access it? nakedpretzel Linux - Hardware 2 02-27-2004 09:47 PM
Only root can access FAT32 drive? morrolan Linux - Software 2 01-06-2004 08:57 AM
USB Problems - Want non-root Access Fade_to_Blah Linux - Hardware 4 12-29-2003 05:15 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration