How to mount thumbdrive with normal user account
Hi, May I know how should I mount my thumbdrive with normal user account? I manage to mount my thumbdrive with my root account. However, when I try to mount it with my normal user account, it said that only root can mount only. So, may I know what should I do now? Please advise me. Thanks. -- Best Regars, Chong Zan Kai
On Thu, 5 Jan 2006, Chong Zan Kai <zkchong@gmail.com> wrote:-
Hi,
May I know how should I mount my thumbdrive with normal user account?
What you'll probably find is that, after plugging it in, a new directory is created under /media. As an example, when I plug my USB pen-drive into my machine, a new directory "/media/usbdisk" is created. In the case of a FAT32 device, the contents of the device don't appear to have a specific user/group associated with it. However, once a user looks in that directory, the contents become "owned" by that user. In other words, if you have more than one user using the machine, whoever is looking at the contents is the "owner" of the files unless more than one user is looking at the files at almost the exact same time. A little experimentation shows that two users performing the same "ls -l" command upto two seconds apart gives the files "owner" as the one who performed the command first. A three second gap is enough for the "ownership" to swap.
I manage to mount my thumbdrive with my root account. However, when I try to mount it with my normal user account, it said that only root can mount only.
So, may I know what should I do now? Please advise me.
Don't bother using mount. Just plug it in and, after a few moments, hotplug should have picked it up and created the mount point for it. Just looking into the directory is enough for it to be mounted. One annoying feature that I have noticed with both SUSE 9.3 and 10.0[0], is that a device mounted this way doesn't show it's free capacity with "df" and I have to either guess just how much free space is left, or temporarily mount the file-system as root to find out. [0] same applies to 10.1alpha as well, which doesn't really surprise me. Regards, And have a Happy New Year David Bolt -- Member of Team Acorn checking nodes at 50 Mnodes/s: http://www.distributed.net/ AMD1800 1Gb WinXP/SUSE 9.3 | AMD2400 256Mb SuSE 9.0 | A3010 4Mb RISCOS 3.11 AMD2400(32) 768Mb SUSE 10.0 | RPC600 129Mb RISCOS 3.6 | Falcon 14Mb TOS 4.02 AMD2600(64) 512Mb SUSE 10.0 | A4000 4Mb RISCOS 3.11 | STE 4Mb TOS 1.62
Thanks for the reply David. I am using suse 10.0 currently. Althought the os manage to detect my thumbdrive when I insert it but it will not mount it correctly. That why I need to use mount. Normally, I will issue these command to mount my thumbdrive. (at root) umount /dev/sda1 umount /dev/sda mount /dev/sda1 /mnt/flash But with these, I cannot write to my thumbdrive with my normal user account. So, I am thinking, should I troubleshoot the hotplug or just solve the normal use account mounting issue. Please advise me. Thanks. On 1/5/06, David Bolt <bcrafhfr@davjam.org> wrote:
On Thu, 5 Jan 2006, Chong Zan Kai <zkchong@gmail.com> wrote:-
Hi,
May I know how should I mount my thumbdrive with normal user account?
What you'll probably find is that, after plugging it in, a new directory is created under /media. As an example, when I plug my USB pen-drive into my machine, a new directory "/media/usbdisk" is created. In the case of a FAT32 device, the contents of the device don't appear to have a specific user/group associated with it. However, once a user looks in that directory, the contents become "owned" by that user.
In other words, if you have more than one user using the machine, whoever is looking at the contents is the "owner" of the files unless more than one user is looking at the files at almost the exact same time. A little experimentation shows that two users performing the same "ls -l" command upto two seconds apart gives the files "owner" as the one who performed the command first. A three second gap is enough for the "ownership" to swap.
I manage to mount my thumbdrive with my root account. However, when I try to mount it with my normal user account, it said that only root can mount only.
So, may I know what should I do now? Please advise me.
Don't bother using mount. Just plug it in and, after a few moments, hotplug should have picked it up and created the mount point for it. Just looking into the directory is enough for it to be mounted.
One annoying feature that I have noticed with both SUSE 9.3 and 10.0[0], is that a device mounted this way doesn't show it's free capacity with "df" and I have to either guess just how much free space is left, or temporarily mount the file-system as root to find out.
[0] same applies to 10.1alpha as well, which doesn't really surprise me.
Regards, And have a Happy New Year David Bolt
-- Member of Team Acorn checking nodes at 50 Mnodes/s: http://www.distributed.net/ AMD1800 1Gb WinXP/SUSE 9.3 | AMD2400 256Mb SuSE 9.0 | A3010 4Mb RISCOS 3.11 AMD2400(32) 768Mb SUSE 10.0 | RPC600 129Mb RISCOS 3.6 | Falcon 14Mb TOS 4.02 AMD2600(64) 512Mb SUSE 10.0 | A4000 4Mb RISCOS 3.11 | STE 4Mb TOS 1.62
--------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-unsubscribe@opensuse.org For additional commands, e-mail: opensuse-help@opensuse.org
-- Best Regars, Chong Zan Kai
On Thursday 05 January 2006 03:55, Chong Zan Kai wrote:
Thanks for the reply David.
I am using suse 10.0 currently. Althought the os manage to detect my thumbdrive when I insert it but it will not mount it correctly.
What mean this exactly? What's wrong? Could you write more about the problem of 'wrong mount' Cheers, Danny -- Danny Kukawka dkukawka@suse.de Mobile Devices SUSE LINUX a Novell Business Maxfeldstr. 5, D-90409 Nuernberg, Germany
On Thursday 05 January 2006 03:46, David Bolt wrote:
Don't bother using mount. Just plug it in and, after a few moments, hotplug
No, it's not hotplug, it's a HAL mount helper.
should have picked it up and created the mount point for it. Just looking into the directory is enough for it to be mounted.
One annoying feature that I have noticed with both SUSE 9.3 and 10.0[0], is that a device mounted this way doesn't show it's free capacity with "df" and I have to either guess just how much free space is left, or temporarily mount the file-system as root to find out.
IMO this should also work if you temporarily access the device or a directory/file on the device as normal user. I think this is a problem of submount/subfs and this should be present longer than 9.3 ago. Danny -- Danny Kukawka dkukawka@suse.de Mobile Devices SUSE LINUX a Novell Business Maxfeldstr. 5, D-90409 Nuernberg, Germany
On Thu, 5 Jan 2006, Danny Kukawka <dkukawka@suse.de> wrote:-
On Thursday 05 January 2006 03:46, David Bolt wrote:
Don't bother using mount. Just plug it in and, after a few moments, hotplug
No, it's not hotplug, it's a HAL mount helper.
My mistake, thanks for pointing it out. You can tell I'm still more used to using hotplug can't you :)
should have picked it up and created the mount point for it. Just looking into the directory is enough for it to be mounted.
One annoying feature that I have noticed with both SUSE 9.3 and 10.0[0], is that a device mounted this way doesn't show it's free capacity with "df" and I have to either guess just how much free space is left, or temporarily mount the file-system as root to find out.
IMO this should also work if you temporarily access the device or a directory/file on the device as normal user. I think this is a problem of submount/subfs and this should be present longer than 9.3 ago.
With 9.0 and 9.1, hotplug controls the USB devices, creates the directories under /media, but doesn't mount the device. Instead, a normal user is allowed to mount a device, which then lets df return the proper figures for usage, capacity and free space. This isn't done under 10.0. Instead HAL does the job hotplug used to do, but it also looks like it automounts the device whenever it's accessed. It's this difference that stops df working properly and requires the use of mount/umount as root to provide the same information. Personally, I can see benefits to both methods. HAL allows devices to literally unplugged at any time, reading/writing from/to the device notwithstanding, but df doesn't supply information for the device. Hotplug allows users to get information but requires the device be mounted/unmounted before you can use it. What would be nice is to retain the ease of use of HAL, and also be able to see the device status without needing to become root or use sudo. <FX:time passes and tests carried out> Looks like I was partially wrong. I can get the information from df, if I perform a df with that specific mount point, and if I do so 2 seconds, or less, after performing some other action on the device: davjam@adder:~> ls /media/usbdisk >/dev/null ; df ; sleep 2 ; df /media/usbdisk Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda16 3739652 246748 3302940 7% / <snippety multiple partitions> //my-ste/spam 62918572 32800004 30118568 53% /media/spam //playing/shared 113108992 86861824 26247168 77% /media/shared //playing/shares 82567168 24102912 58464256 30% /media/share Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 511712 22728 488984 5% /media/usbdisk davjam@adder:~> ls /media/usbdisk >/dev/null ; df ; sleep 3 ; df /media/usbdisk Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda16 3739652 246748 3302940 7% / <snippety occurred again> //my-ste/spam 62918572 32801508 30117064 53% /media/spam //playing/shared 113108992 86861824 26247168 77% /media/shared //playing/shares 82567168 24102912 58464256 30% /media/share Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 0 0 0 - /media/usbdisk Regards, And have a Happy New Year David Bolt -- Member of Team Acorn checking nodes at 50 Mnodes/s: http://www.distributed.net/ AMD1800 1Gb WinXP/SUSE 9.3 | AMD2400 256Mb SuSE 9.0 | A3010 4Mb RISCOS 3.11 AMD2400(32) 768Mb SUSE 10.0 | RPC600 129Mb RISCOS 3.6 | Falcon 14Mb TOS 4.02 AMD2600(64) 512Mb SUSE 10.0 | A4000 4Mb RISCOS 3.11 | STE 4Mb TOS 1.62
On Thu, Jan 5, 2006 at 6:45 PM, in message <j4$H4eY9sVvDFwYz@dev.null.davjam.org>, bcrafhfr@davjam.org wrote:
Looks like I was partially wrong. I can get the information from df, if I perform a df with that specific mount point, and if I do so 2 seconds, or less, after performing some other action on the device:
If you don't give any parameters to df, it will tell you the status of all partitions it can find in /etc/mtab. If it's not there, df doesn't see it. But if you pass it the partition, it will tell you. So the "problem" is that the automatic mounter mounts without adding an entry in mtab Anders Johansson Linux Technical Support Engineer Novell Technical Services
On Thursday 05 January 2006 18:45, David Bolt wrote:
IMO this should also work if you temporarily access the device or a directory/file on the device as normal user. I think this is a problem of submount/subfs and this should be present longer than 9.3 ago.
[...]
This isn't done under 10.0. Instead HAL does the job hotplug used to do, but it also looks like it automounts the device whenever it's accessed. It's this difference that stops df working properly and requires the use of mount/umount as root to provide the same information.
No, you missunderstand how this work. Not HAL is the problem. The problem is submount and subfs. In fact the problem is the submountd. If the device is not in use and nobody is accessing the volume submountd try to umount the volume and remount the volume if someone access the volume. This is the reason why you sometime get no information from df. In this case the volume is only mounted with subfs and not with the real filesystem. The real filesystem is only mounted if you access the device. With this you can remove the usbstick after some seconds (IMO 2-3 sec) if you stop accessing the stick. I hope this explain your problem. Cheers, Danny -- Danny Kukawka dkukawka@suse.de Mobile Devices SUSE LINUX a Novell Business Maxfeldstr. 5, D-90409 Nuernberg, Germany
participants (4)
-
Anders Johansson
-
Chong Zan Kai
-
Danny Kukawka
-
David Bolt