[TAG] Camera permissions on Kubuntu

Mike Orr sluggoster at gmail.com
Sun Jan 7 07:23:51 MSK 2007


On 1/6/07, Mike Orr <sluggoster at gmail.com> wrote:
> Trying to mount my camera, which works fine on Gentoo and I think on
> another Kubuntu computer.  /etc/fstab says:
>
> ```
> /dev/sda1        /mnt/camera    vfat
> user,noauto,nodev,dmask=0000,fmask=0666,uid=1000,gid=1000    0 0
> '''
>
> (All on one line.)
>
> But when I mount it the permissions are:
>
> ```
> % ls -l /mnt/camera
> total 32
> drwxr-xr-x 3 root root 16384 2006-01-01 00:00 dcim
> drwxr-xr-x 2 root root 16384 2006-01-01 00:00 misc
> % ls -l /mnt/camera/dcim/100_pana/p100054*
> -rwxr-xr-x 1 root root 1625995 2007-01-06 18:44
> /mnt/camera/dcim/100_pana/p1000541.jpg
> '''
>
> It's recognizing the user option but ignoring the uid,gid,fmask, and
> dmask options.
>
> I set the unmounted directory to mode 777 owned by myself because I
> remembered hearing that has some effect on the mount's permissions,
> but it didn't make a difference.
>
> I tried mounting it with sudo and without, and removing the uid/gid or
> fmask/dmask options, but it didn't help.

Well, it's something weird with KDE's automounting.  I noticed a
discrepency between 'mount' (which listed my options) and /proc/mounts
(which listed the different options it was showing), and there were
two entries in /proc/mounts for /dev/sda1.  So I rebooted to clear out
the multiple entries, and noticed it was accessing the camera on boot.
 I get two icons on the desktop, "USB Mass Storage" and "Camera", and
two dialogs asking what I want to open it with.

The "camera" icon goes to /mnt/camera and shows the usual directories;
the "USB Mass Storage" icon goes to "camera://Panasonic Lumix
FZ5@[usb:001,009]/" which shows nothing, and eventually I get an error
"Konqueror: could not read file /".  That's what got me to copy the
fstab line from my old system in the first place.  What's more, as
soon as that window opens, the directory icons disappear in the other
window.  'mount' and /proc/mounts suggest nothing is mounted.  If I
try to mount it manually I get "mount: special device /dev/sda1 does
not exist".

The "Camera" icon I can get rid of with its "Remove safely" menu item,
but the "USB Mass Storage" icon has no unmount option; the closest is
"Delete".  Deleting the icon or moving it into the trash brings up a
"Delete file(s) progress" dialog that hangs at "Initializing camera".

If I unplug the camera, the icon disappears.  If I plug it back in
again, both dialogs reappear ("USB Mass storage interface, medium
type: Camera", and "250M removable media; medium type: unmounted
removable medium".  The options are "Open in new window", "upload
photos to Digikam", and "do nothing".  I choose "Do nothing" for both.
 Now I can mount my camera and it has the proper owner and
permissions, hallelujah.

The two device icons appear when I mount the camera.  They remain when
I unmount it, but disappear when I unplug it.

I comment out the camera line in /etc/fstab, disconnect the camera and
reboot.  When I plug the camera in, I choose "Open in new window" for
"250M Removable media" but *not for "Camera".  This time I get a
proper Konqueror window for "/media/usbdisk".

Well, it works if I remember all those steps, but it's weird.

-- 
Mike Orr <sluggoster at gmail.com>




More information about the TAG mailing list