Help for Mounting a USB Memory Stick in SUSE 10.3. Permission Denied.
SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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??
Also "users" may work better than "user". Any user will be able to mount it but only the uid= and gid= owners will be able to access it. ( It just seems that I've had better luck with the users options )
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.
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.
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.
Is the line above a typo? If it's not, it's not going to work. First, you need a space between 'mount' and /dev/sdb1, second you need the forward slash '/' before mnt like this: /mnt/usbstick. I would suggest entering the following as root in a terminal:
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.
The next time I insert the pendrive, I might use a different usb port, or it may be plugged in after a different usb device.
It is using /dev/sdi1 now so that is what I will use for the udevinfo -n argument:
If I wanted the mount point for this pendrive to be unique, I could use the UUID number. If it is for podcasts, I could relabel more then one pendrive "PODCASTS" and use the label "LABEL=PODCASTS" instead in /etc/fstab.
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)
So for this pendrive I would use an /etc/fstab entry like:
The previous post about "auto rw,noauto" was not correct. The first auto was for the filesystem and the noauto in the options means something different. I used vfat for the filesystem entry in my example however. The noauto in the options field are needed to prevent a lockup when booting up without the device plugged in. The user option, which you also used allow mounting the device as a regular user. A regular user can mount the device, but due to the "uid=" entry, only that user can read it if you also use an fmask= and dmask= entry.
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.
The nodes are created by the udev daemon. Your default udev rules are probably OK for a pendrive. However if the udevd daemon isn't running the device nodes won't be created. If the filesystem is corrupt, or there is no partition, then udev can't create these nodes.
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
Determine the node used presently to use for the udevinfo command
Use udevinfo to gather the UUID, LABEL and filesystem type
Use fdisk to see if the device has a partition
Either remove the entry for the device in /etc/fstab and rely on automounting or create a valid fstab entry using the data gathered from udevinfo.
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.
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">
<description>Mount file systems from removable drives.</description>
<message>System policy prevents mounting removable media</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>
If <allow_active>no</allow_active> is there instead, then you could see your problems.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.