Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with 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.
Thanks to help from finegan and others in this previous thread http://www.linuxquestions.org/questi...threadid=96788
and lots and lots of help from other areas of this forum I have purchased and mounted a usb compact flash card reader. All of this inspite of the fact that I am a newbie.
Here's the little snag of a problem: I can only access my pictures on the compact flash card when logged on as root. I can't get to them when logged on as my regular user. I know instructions for changing this are out there, but I've looked at them and so far they haven't clicked with my poor little brain.
Could somebody give clear instructions on how to permanently change the permissions on my mounted reader? Something so simple as this has escaped my grasp for hours on end.
Distribution: PCLinuxOS 0.93 and 0.92, Vector sometimes
Posts: 825
Rep:
Use a program called KwikDisk. You should find it under - Start - Configuration - Hardware - KwikDisk. Start the program. A small icon of 3 cubes - red/green/blue - should appear on the Taskbar. Click it nad choose Start KDiskFree. You should see an entry for your usb drive at the bottom of the window, probably as sda1. Click on the icon and choose Mount. That should do it. Remember to unmount it before you remove the drive.....
Do you have devfs installed? With devfs installed, as a regular user, I just put the card in the reader and an icon appears on my desktop (in gnome, not sure about kde) for the reader called "removable". Devfs mounts the reader /dev/sda1 at /mnt/removable. This may work for you...
Have you tried the chmod command? If your reader is mounted at /mnt/reader, execute the following as root:
chmod 777 /mnt/reader
Then try to mount the reader as a non-root user and see what happens...
It doesn't look like I made myself clear enough. I already have mounted my camera as sda1. It will appear on the desktop of my normal user. The problem is that I can't access the photos as a regular user, only when logged in as root. I want to change this, and I need to know how.
Daniel -
I am a newbie, so what do you mean by devfs installed as a regular user? I have devfs installed somewhere, but I don't know what they do, where they are, or under who they are installed. All I can tell you is what I do to get the camera to work under root.
On my regular user desktop in gnome on Mandrake 9.1 I plug in my usb device. It is recongized. Then I log onto a root console and mount it by typing the command you listed, Daniel. I can open the folder "removable" or "camera" (depending on which I've mounted it as) but I can't see the folder inside "removable" or, when I can see it I can't open it because it says I don't have permission/not owner etc etc. However, in the root console I can see the folder, and all the pictures inside the folder (Aaarrgh! Very frustrating)
Everything works hunky-dory when I log onto the GUI as root.
Is my problem caused by the fact that I mount the card reader while logged into console as root, so only root can access the card? That is what it seems like you are saying from your message.
Sorry for the confusion about devfs. Devfs can only be installed as root. I meant that if I have devfs installed, the icon for the reader just appears on the gnome desktop when I log in to a non-root account and plug in the reader. Does that make sense?
The problem is that the card is mounted as root, and the non-root users don't have permission to read the files. Is there a line in the /etc/fstab file for the camera/reader? If not, there should be. If there is a line, it may need to be changed to allow non-root users to access the reader. See this page http://www.cs.sfu.ca/~ggbaker/personal/cf-linux - particularly the "Final Setup" section.
The option "user" above should allow user to mount the memory card. See if this helps you. It is true that typically only the person that mounts the drive gets to see the contents of it.
It is strange that Mdk 9.1 does not properly set up the permissions for you. I am also using Mdk 9.1, and somehow the contents of my /etc/fstab changes as it wishes (which I hate very much, actually).
Thanks to all who replied. I really appreciate it.
Following the instructions supplied by the link given by Daniel I got my card to be readable by my regular user. Yaaah!
This is great, and I am happy, but could Daniel, michaelk, wirawan, or someone else, please explain the varations in the fstab line? I want to learn, and I've no idea what was wrong with the fstab that was initially put in there for the device by Mandrake.
which is what I found at the link provided by Daniel. The only difference between these two is the rw in the first, but both commands are completely different from the original in Mandrake.
Glad it's working! For help with the fstab file format, run "man fstab" or "man mount". These man pages explain all the thousands of options for mounting filesystems. The "rw" in wirawan's post means read-write, but it might not be required to use your reader...
Just curious about post #8: Rundi, was that line the one you had beforehand? (I.e., the one that prevented you from reading the card's content unless you're root?)
The option `user' means that users can mount the device. And only that user can unmount it. (Of course root can bypass everything :-)
Typically only the user that mounts the device will have access to the device. I'm not certain if this is 100% correct. But too bad I don't have the card with me. Let me take a similar example: /mnt/floppy (the diskette drive). The options are similar to your /mnt/removable. When I mounted the diskette:
wirawan $ mount /mnt/floppy
and I check the directory /mnt/floppy with `ls -dl', here's the answer:
drwxr--r-- 2 wirawan wirawan 3584 Dec 31 1969 /mnt/floppy/
So I'm the one that pretty much can access the floppy. Others can't, as the other's permission is only `read', with no `execute' right at all! This may be the source of your problem. If you mount the device as root, then you must be root in order to read from it.
The other options are somewhat bell-and-whistle things. `codepage' and `iocharset' options are for dealing with different character sets (remember, not all systems out there use ASCII). The `exec' option allows you to execute files from the floppy. If you don't like this (or are concerned with security), it's best to change this to `noexec'. For FAT filesystems (msdos, fat, vfat), try adding option `showexec'. This will make your `ls' output not ALL-GREEN. :-) It will only mark *.bat, *.com, and *.exe as green (which is nice).
Option `kudzu' is fairly new. I still don't know what use of it. It has to do with hardware autodetection (is it right?).
The line in post #8 was from my fstab before I did any changes. In other words, I assume, something in that line was screwing me up.
Instead of the line in post #8 I followed the link Dems gave and (as per the instructions in the section Final Setup) put in the text:
/dev/sda1 /mnt/camera vfat noauto,user 0 0
in the fstab. I could then mount the card reader at /mnt/camera as my regular user. Before I could only mount it as root. When I tried to mount it as user I got the message that only root could do it.
From the circumstantial evidence I would gather that something in my old fstab was keeping my "user" from mounting the camera. Would it have something to do with the "auto" bit, or the "umask"?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.