Help for Mounting a USB Memory Stick in SUSE 10.3. Permission Denied.
I am running Open SUSE 10.3, I have purchased a 4GB USB Stick, it is labeled "USB DISK 2.0 Music Player" I don't know what this means as I bought it as a standard USB Stick. I edited fstab and added a line
"/dev/sdb1 /mnt/usbstick auto noauto,user,sync, 0 0" then made a folder in mnt - usbstick, then did a "dev/sdb1 /mnt usbstick" in a console as root. I get a message " permission denied. If I try to mount the device from the desktop icon, I get the message " you are not privileged to mount volume UDISK". Can any one explain what is happening, how to get round this, what I am doing wrong. The stick works fine with windows XP. I have looked at similar theads but non have helped. Thanks. |
10.3 is usually pretty good at auto mounting usb sticks. Be that as it may, are you sure the device is sdb1?? Did you determine this via /var/log/messages?? As for your command "dev/sdb1 /mnt usbstick", I'm assuming that's a typo and you meant "mount /dev/sdb1 /mnt/usbstick". Have you checked 'My Computer' to see if it is there??
|
For automounting to work, make sure you don't use the "noacpi" mount option. Hald and dbusd need it to run.
Follow the kernel messages if you aren't certain what the device is: sudo tail -f /var/log/messages If there is a problem with the filesystem you may get a /dev/sdb but not a /dev/sdb1. Also it may have been misformatted without partitioning. Look at "sudo file -s /dev/sdb" and "sudo file -s /dev/sdb1". That will tell you if a partition is found and the filesystem. Run "udevinfo -q env -n /dev/sdb1". Copy the UUID number. It is better to use UUID= or LABEL= in /etc/fstab instead of the device. Here is how a pendrive automounted on my system: Code:
/dev/sdf1 on /media/disk type vfat (rw,nosuid,nodev,noatime,flush,uid=1000,utf8,shortname=lower) Code:
udevinfo -q env -n /dev/sdf1 Code:
UUID=UUID=3B69-1AFD /mnt/usbstick vfat rw,noauto,nosuid,nodev,noatime,flush,uid=flatstan,utf8,shortname=lower,fmask=0117,dmask=007,user Many of the options I borrowed from how a 4 GB pendrive was mounted. The "noauto, uid, gid, and user/users" optons will permit you as a regular user to mount the pendrive without needing to use sudo. Also, on this system (and only this system) you can control access. (note: I added my own private default group) You can use "fmask=0177,dmask=0077" for only owner access. |
USB Stick
Thanks people, I'll try your suggestions & get back.
|
USB Stick
Thanks all, I have tried your suggestions but I still get a message
"permission denied" each time. fdisk -l shows the device as sdb1. Why is permission denied when I am root ?????? |
In your first post your fstab entry for the usbstick has 'auto' and 'noauto' which are conflicts. Don't know that has anything to do with mounting.
You then indicate you issued this command, in quotes I assume? then did a "dev/sdb1 /mnt usbstick" in a console as root That won't do anything. To mount you need the mount command: mount -t ext3 /dev/sdb1 /mnt/usbstick. You didn't give the mount command according to your entry and you didn't have the '/' between /mnt and /usbstick. When you try to mount using the desktop icon, are you logged in the GUI as root or are you logged in as a normal user? Switching to root in a terminal won't make you root outside the terminal. |
USB Stick
I have tried all the reply's suggestions, I have modified and also deleted the entry in fstab.
The original mount command I posted in a console was a typo, I meant mount/dev/sdb1 mnt/usbstick. I regularly use a slave Hard Disk Drive & I use a similar entry in fstab also a similar mount command, this works perfectly. Sorry to be a pain but I really don't understand why I always get the message "permission denied" or similar whether or not I am logged in as root or user, at boot, or by logging off then on, or whatever variation of the mount command I use, or whether or not the additional entry is in fstab. I have always thought that root has full permission to do anything & would only get an error message if anything is wrong, not be denied permission, it does not make sense. Using "fdisk -l" the stick is shown as sdb1 & vfat. Would you please tell me the procedure that I should be using, step by step, in detail, for mounting the stick from the very beginning, including the entry in fstab, if it is required. I am running Open SUSE 10.3. When I plug in the stick either as user or root it is recognised & an icon on the desktop shows as - "USB DISK 2.0 Music Player", if I try mounting - by right click on the icon & choosing mount, or use the mount command, either as root or user, I am still denied access. As I said the stick works OK in Windows. Thanks. |
Code:
I meant mount/dev/sdb1 mnt/usbstick mount -t vfat /dev/sdb1 /mnt/usbstick After doing that, navigate to the /mnt/usbstick directory to see if files are there. I'm not really familiar with usb sticks so not sure what else could be the problem. When you right-click on your usb icon on the Desktop and select properties, what does it show for owner/users/permissions? |
If you have an explicit entry in fstab, then the pendrive won't automount. It is your choice.
Do not use a device node in /etc/fstab for an external device. The next time you insert the device and try to mount it, it may have a different node number. Use either "UUID=" or "LABEL=". You can get this information using the udevinfo command using the currently used node. Here a usb key is automounted: Code:
sudo tail -f /var/log/messages It is using /dev/sdi1 now so that is what I will use for the udevinfo -n argument: Code:
> udevinfo -q env -n /dev/sdi1 Here is how the pen drive was mounted: Code:
/dev/sdi1 on /media/CRUZER128 type vfat (rw,nosuid,nodev,noatime,flush,uid=1000,utf8,shortname=lower) Code:
UUID=3B69-1AFD /mnt/pendrive/ vfat rw,noauto,user,nosuid,nodev,noatime,flush,uid=jschiwal,utf8,shortname=lower 0 0 If doing this doesn't work, check if the filesystem on the pendrive is ok. Also check /var/log/messages for more details on why mounting failed. Also, after inserting the device, look at the files in /dev/disk/by-uuid/ and /dev/disk/by-label and see if nodes were created. Code:
jschiwal@hpmedia:~/Documents> ls /dev/disk/by-label -l Another possibility is that the pendrive is created without a partition table, just a filesystem. You can check it like this: sudo file -s /dev/sdi for a pendrive assigned to /dev/sdi. --- I am repeating information that you apparently have ignored. You need to
|
Mounting USB Stick
Thanks people for your help, sorry I have not been back but I have been away for a while.
Following your advice, - as root, I can successfully mount the Stick using - mount -t vfat /dev/sdb1 /mnt/usbstick and then unmount with umount. I have tried your suggestions for automounting, using UUID, Label, etc, entries in FSTAB, but with no success, I am not bothered though as the manual mount works fine although a tad labourious. How do I comment out a line in FSTAB ? As you probably have gathered, although I have been using SUSE for a while I am still very much a learner. thanks again. |
Just precede the line in /etc/fstab with "#".
Which desktop do you use? KDE communicates with HAL via the dbusd daemon. Is dbusd running? How about kded? If you insert a pendrive, does a requester pop up (KDE 3.5). If so, select properties. In the mounting tab, you can select to automount the disk as the user. Also check the file "/usr/share/PolicyKit/policy/org.freedesktop.hal.storage.policy". It should contain: Code:
<action id="org.freedesktop.hal.storage.mount-removable"> If you get a permission denied response, monitor the kernel messages. There should be one with info on why mounting is denied. ( sudo tail -f /var/log/messages ) Here is the message for a successful automount: Code:
Oct 15 23:39:41 hpmedia hald: mounted /dev/sdf1 on behalf of uid 1000 |
All times are GMT -5. The time now is 03:52 PM. |