Can't setup usbmount on Ubuntu 12.04.1 LST
Csányi Pál
csanyipal at gmail.com
Thu Aug 30 18:32:11 UTC 2012
Basil Chupin <blchupin at iinet.net.au> writes:
> On 30/08/12 19:31, Csányi Pál wrote:
>>
>> on my newly installed Ubuntu 12.04.1 LST system I removed unity because
>> I prefer Window Maker.
>>
>> Now I must to setup some things, like automount USB sticks.
>>
>> I installed the usbmount package and setup it in
>> /etc/usbmount/usbmount.conf file:
>>
>> ENABLED=1
>> MOUNTPOINTS="/media/usb0 /media/usb1 /media/usb2 /media/usb3
>> /media/usb4 /media/usb5 /media/usb6 /media/usb7"
>> FILESYSTEMS="vfat ext2 ext3 ext4 hfsplus"
>> MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime,rw"
>> FS_MOUNTOPTIONS="-fstype=vfat,gid=floppy,dmask=0007,fmask=0117"
>> VERBOSE=no
>>
>> Now, when I plug the USB Stick I can't open it's directory:
>> /media/usb0
>
> In the first instance, the usb stick will be designated as
> dev/sddX[***] and not usb0.
/media/usb0 is the mount point only.
> Secondly, the usb stick has to be formatted and when you do this it
> will have a partition sdd1.
>
> Assuming that you youself have not formatted it (for, say, ext4, it
> would be formatted at factory to vfat) so if you want to mount it you
> would, in a terminal, issue this command:
>
> mount -t vfat /dev/sdd1 /media
>
> and you should then be able to access it.
The USB was formatted as fat32 filesystem so in 'usbmount.config' are
lines for this:
FS_MOUNTOPTIONS="-fstype=vfat,gid=floppy,dmask=0007,fmask=0117"
I don't want to mount it but want to ,et it mount automatically by
'usbmount'.
> HOWEVER, I will bet my bottom dollar that you will only be able to
> access it if you were root because the usb is "owned" at the moment by
> root. So, if you want to access it as a user then, as root, issue
> these commands (in a terminal):
>
> chown -R <youruserloginname>.group /dev/sdd1 [ENTER]
>
> chmod -R u=rwx,g=rx,o= /dev/sdd1 [Enter]
>
> and you will then be able to access it as a user.
As I said, I'm using 'usbmount' so I should not mount it manually, right?
> Oh, there is no need to do anything about any entries in fstab for it
> because it will be mounted as soon as you plug it in.
Maybe I didn't mentioned before: I purged nautilus and as many as I
could Unity's stuff. So, when I plug it in, it is automounted because I
have now installed usbmount.
But, only root can acces the USB drive, however /media/usb0 as a
mountpoint has permissions root:floppy and my username is in hte
'floppy' group. Still I don't understand why can access the drive as
root only?
> [***] The allocation of the 'sd' depends on what other devices you
> have on your system. For example if you have 2 HDDs and a CDROM reader
> and DEV writer these will be 'named; sda, sdb, sdc, sdd so the USB
> stick will end up being sde - if you see what I mean.
The usb drive is present in mtab as:
/dev/sdc1 /media/usb0 vfat
rw,noexec,nodev,sync,noatime,nodiratime,gid=25,dmask=0007,fmask=0117 0 0
--
Regards from Pal
More information about the ubuntu-users
mailing list