Find the answer to your Linux question:
Results 1 to 7 of 7
I have a question about mounting usb devices. I am using Red Hat 9 and when I try to connect my digital camera through the usb port I get an ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2003
    Location
    Cyprus
    Posts
    96

    Mounting USB Ports


    I have a question about mounting usb devices. I am using Red Hat 9 and when I try to connect my digital camera through the usb port I get an error saying "couldn't initialize device" - (Ptkam). When I log in as root the camera is again detected and works fine and I tranfer my pictures.
    I think is the usb mounting permissions and that only root can mount usb devices.
    Anyway my question is how can I mount my usb digital camera when I am logged in as user? What file do I have to edit and how to give mounting usb access to users?
    Thanks in advance.

  2. #2
    Linux Enthusiast
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    556
    maybe look in your groups see if root has access to usb that user does not, if so add it to user or change the permission for that /dev/.

    just an idea, i've never had to do that, so see if anyone here has actually done it successfully

  3. #3
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    It depends on what kind of USB device the camera is. Probably, it's a USB Mass Storage compliant device. In that case, it interfaces with userspace through the SCSI hard disk interface. If you don't have any other SCSI hard disks, it will /dev/sda, so you'll need to change the permissions on that one. Do that by editing /etc/security/console.perms, and add these two lines:
    Code:
    <dcam>=/dev/sda*
    <console>  0600 <dcam>       0600 root.disk
    Then, log out and back in again to let pam_console do its work.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Aug 2003
    Posts
    26

    Re: Mounting USB Ports

    Quote Originally Posted by Arkas
    I have a question about mounting usb devices. I am using Red Hat 9 and when I try to connect my digital camera through the usb port I get an error saying "couldn't initialize device" - (Ptkam). When I log in as root the camera is again detected and works fine and I tranfer my pictures.
    I think is the usb mounting permissions and that only root can mount usb devices.
    Anyway my question is how can I mount my usb digital camera when I am logged in as user? What file do I have to edit and how to give mounting usb access to users?
    Thanks in advance.
    It depends on how you mount your camera. My camera is mounted as a USB master storage device. So I added the following entry into my fstab file located in /etc/fstab

    /dev/sda1 /mnt/sony-camera msdos noauto,users 0 0

    Which means that: device /dev/sda1 must be mounted at /mnt/sony-camera with filesystem msdos, but not automatically mounted and users are able to mount this device.

  6. #5
    Just Joined!
    Join Date
    Jun 2003
    Location
    Cyprus
    Posts
    96
    Thanks for your replies. I think i'll try the method that daveo wrote cause i don't want go editing files that i don't yet understand.
    Anyway i did a bit of a search for this method and i got another example of fstab which is like this:
    /dev/sda1 /mnt/Camera vfat noauto,user,ro 0 0

    Well i know that noauto means that is not supposed to mount at boot but on request and that ro means only read access but what is the difference between vfat and msdos and how do i know which one is better for my cam? I am using a Kodak DX4330.

  7. #6
    Just Joined!
    Join Date
    Aug 2003
    Posts
    26
    Quote Originally Posted by Arkas
    Thanks for your replies. I think i'll try the method that daveo wrote cause i don't want go editing files that i don't yet understand.
    Anyway i did a bit of a search for this method and i got another example of fstab which is like this:
    /dev/sda1 /mnt/Camera vfat noauto,user,ro 0 0

    Well i know that noauto means that is not supposed to mount at boot but on request and that ro means only read access but what is the difference between vfat and msdos and how do i know which one is better for my cam? I am using a Kodak DX4330.
    As far as I know, vfat is being used by mounting Windows 95 filesystems. I use ms-dos because it's also readable for my Windhooz machine and this is the only filesystem my card currently has. I assume that my camera is only able to read a ms-dos partition....

    b.t.w Do not ever set rights on devices unless you realy know what you are doing. Fstab is designed to add rights for users, to be able to mount devices on your permissions.

  8. #7
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Both vfat and msdos are variants of the fat driver. msdos forces the driver to use no non-DOS extensions (such as long filenames or anything). It might even be forced to FAT12, but I'm not sure about that. vfat adds the Winbloze 95 extensions with long filenames and all. vfat is perfectly safe to use on virtually any FAT filesystem since it won't add any extensions unless asked to (eg. by creating a file with a long name).

    Sorry for not supplying the fstab entry myself, I just thought of it as obvious (I've been making more of these mistakes lately... I need to redeem my ways, it seems). In any case, to understand fstab correctly, run "man 5 fstab" and "man 8 mount " to see the manpages for fstab and mount. They will describe most, if not all, file systems and mount options. If you use GNOME, you can also use GNOME's help browser to view them. Or, you can view them as postscript with "man -t 5 fstab | gv -". I find the latest one preferrable, but it requires gv to be installed on your system.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •