Tux

...making Linux just a little more fun!

Camera permissions on Kubuntu

Mike Orr [sluggoster at gmail.com]
Sat, 6 Jan 2007 19:45:52 -0800

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.

-- 
Mike Orr <sluggoster@gmail.com>

Top    Back


Mike Orr [sluggoster at gmail.com]
Sat, 6 Jan 2007 20:23:51 -0800

On 1/6/07, Mike Orr <sluggoster@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@gmail.com>

Top    Back


Mike Orr [sluggoster at gmail.com]
Sat, 6 Jan 2007 20:44:37 -0800

On 1/6/07, Mike Orr <sluggoster@gmail.com> wrote:

> Well, it's something weird with KDE's automounting.

Well, lookee that. If I set the camera to PTP mode instead of PC mode, I get only one dialog from KDE, Konqueror opens to "camera://USB PTP Class Camera@[usb:001,009]/", and it actually contains my pictures. The top directory has a summary.txt file that gives some camera specs:

Model: (null)
  device version: 1.0
  serial number:  (null)
Vendor extension ID: 0x00000000
Vendor extension description: (null)
 
Capture Formats:
Display Formats: Association/Directory, Script, DPOF, Apple Quicktime,
JPEG, TIFF
 
Device Capabilities:
	File Download, No File Deletion, File Upload
	No Image Capture, No Open Capture, No vendor specific capture
 
Storage Devices Summary:
store_00010001:
	StorageDescription: None
	VolumeLabel: None
	Storage Type: Removable RAM (memory card)
	Filesystemtype: Digital Camera Layout (DCIM)
	Access Capability: Read-Write
	Maximum Capability: 250085376 (238 MB)
	Free Space (Bytes): 244989952 (233 MB)
	Free Space (Images): 0
 
Device Property Summary:
I'll be jiggered.

-- 
Mike Orr <sluggoster@gmail.com>

Top    Back