LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-09-2006, 06:43 PM   #1
sunman
Member
 
Registered: Jun 2005
Distribution: Slackware64 13.0 (multilib)
Posts: 67

Rep: Reputation: 15
Allowing a user to mount a digital camera


Hi all,

I just got a new toy, a Samsung Digimax D53 digital camera (which rocks btw). I use a dual boot system (win98se/slack 11) but I run predominantly in linux. The camera is recognized by linux as a scsi drive (sda1), and works excellently except for the fact that I run as a normal user and I'm having to switch to root to mount it and to delete the pictures/avi files after I've copied them off. (actually having just said that, I've never tried to mv or move them in kde as my user account so not sure what would happen if I tried that)

Anyways, I tried adding a line to fstab so that I could mount/unmount as my normal user account.

/dev/sda1 /mnt/camera auto noauto,user 0 0

But when I do that, the next time I plug the camera into the usb cable and turn it on, it mounts as the next scsi drive after the one I put in fstab. In other words, after I added the above line the system recognized the camera as sdb1 instead of sda1. If I change the fstab entry to sdb1, it goes to sdc1 etc etc. If I remove the line altogether it is recognized as sda1 every time. While I can certainly use it, it'd be easier not to have to switch to root to mount/unmount the camera.

Any ideas how I can fix this? I'm running the 2.6.17.13 kernel custom compiled for my system and I check to see which drive the camera is seen as by watching /var/log/messages (tail -f /var/log/messages). Is it something to do with udev and the 2.6 kernel?

Thanks in advance for any ideas on this.
 
Old 12-09-2006, 07:03 PM   #2
xpromisex
Member
 
Registered: Apr 2004
Location: Statesboro, GA
Distribution: Arch Linux 2007.05 "Duke" (Kernel 2.6.21)
Posts: 447

Rep: Reputation: 30
try umask=0000 after "user" on your fstab line to fix the root issue. Not sure about the sda/ sdb thing though. You might be able to create a udev rule, but I couldn't begin to tell you how to do that.

Last edited by xpromisex; 12-09-2006 at 07:04 PM.
 
Old 12-09-2006, 07:10 PM   #3
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
Don't use 0000 umask, that opens up everything. "user" as already done is better. If you use "showexec" for FAT filesystems, the files also have saner permissions (only directories, COM, EXE, and BAT files are executable).

Please post the "tail" of syslog and dmesg when you plug in/turn on the camera.
 
Old 12-09-2006, 07:28 PM   #4
sunman
Member
 
Registered: Jun 2005
Distribution: Slackware64 13.0 (multilib)
Posts: 67

Original Poster
Rep: Reputation: 15
Thanks for the replies so far

last few lines of dmesg as the camera is turned on...
Code:
usb 1-2: new low speed USB device using uhci_hcd and address 2
nvidia: module license 'NVIDIA' taints kernel.
ACPI: PCI Interrupt 0000:01:05.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
NVRM: loading NVIDIA Linux x86 Kernel Module  1.0-9629  Wed Nov  1 19:30:07 PST 2006
shpchp: HPC vendor_id 1022 device_id 700f ss_vid 0 ss_did 0
shpchp: shpc_init: cannot reserve MMIO region
shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
usb 1-2: configuration #1 chosen from 1 choice
input: Logitech USB-PS/2 Optical Mouse as /class/input/input1
input: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:11.2-2
It didn't log anything at all about the camera.


last few lines of syslog as the camera is turned on...
Code:
Dec  9 15:21:05 shadyvale kernel: ACPI wakeup devices:
Dec  9 15:21:05 shadyvale kernel: SLPB PCI0 USB0 USB1
Dec  9 15:21:05 shadyvale kernel: VFS: Mounted root (reiserfs filesystem) readonly.
Dec  9 15:21:05 shadyvale kernel: ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 5
Dec  9 15:21:05 shadyvale kernel: nvidia: module license 'NVIDIA' taints kernel.
Dec  9 15:21:05 shadyvale kernel: NVRM: loading NVIDIA Linux x86 Kernel Module  1.0-9629  Wed Nov  1 19:30:07 PST 2006
Dec  9 15:21:05 shadyvale kernel: shpchp: shpc_init: cannot reserve MMIO region
Dec  9 15:21:21 shadyvale kdm_greet[1233]: Can't open default user face
Dec  9 19:22:56 shadyvale kernel: sda: assuming drive cache: write through
Dec  9 19:22:56 shadyvale kernel: sda: assuming drive cache: write through
Dec  9 19:26:35 shadyvale kernel: sda: assuming drive cache: write through
The only thing it's showing is the message about assuming drive cache.
 
Old 12-09-2006, 07:42 PM   #5
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
Oh, just to be sure, the most updated dmesg is retrieved using the command, not the file.
 
Old 12-09-2006, 08:02 PM   #6
sunman
Member
 
Registered: Jun 2005
Distribution: Slackware64 13.0 (multilib)
Posts: 67

Original Poster
Rep: Reputation: 15
Thanks tuxdev, forgot about that

Code:
SCSI device sda: 1950720 512-byte hdwr sectors (999 MB)
sda: Write Protect is off
sda: Mode Sense: 00 06 00 00
sda: assuming drive cache: write through
SCSI device sda: 1950720 512-byte hdwr sectors (999 MB)
sda: Write Protect is off
sda: Mode Sense: 00 06 00 00
sda: assuming drive cache: write through
 sda: sda1
sd 2:0:0:0: Attached scsi removable disk sda
sd 2:0:0:0: Attached scsi generic sg0 type 0
usb-storage: device scan complete
usb 1-1: USB disconnect, address 5
usb 1-1: new full speed USB device using uhci_hcd and address 6
usb 1-1: configuration #1 chosen from 1 choice
scsi3 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 6
usb-storage: waiting for device to settle before scanning
  Vendor: Samsung   Model: Digital Camera    Rev:
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sda: 1950720 512-byte hdwr sectors (999 MB)
sda: Write Protect is off
sda: Mode Sense: 00 06 00 00
sda: assuming drive cache: write through
SCSI device sda: 1950720 512-byte hdwr sectors (999 MB)
sda: Write Protect is off
sda: Mode Sense: 00 06 00 00
sda: assuming drive cache: write through
 sda: sda1
sd 3:0:0:0: Attached scsi removable disk sda
sd 3:0:0:0: Attached scsi generic sg0 type 0
usb-storage: device scan complete
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
IPv6 over IPv4 tunneling driver
eth0: no IPv6 routers present
I just tried to make the problem occur again...with no success. I added the following
/dev/sda1 /mnt/camera auto noauto,user 0 0
to fstab again and now the camera is being recognized as sda1 each time...thus proving to me that inanimate objects will make a fool of you when you try to get someone to help you

The only thing I did notice was there is a little problem with the kde media kicker applet. When I mounted it via the icon on the applet, I could open it up in a konqueror window and everything looked good, but when I unmounted it and tried again to make sure, it was still showing up as mounted in the /mnt directory. When I went to a cl, cd'd to the /mnt directory and issued mount camera I got a statement that mtab was already showing it as mounted. so I issued a cl umount and that worked as normal.

So maybe the issue with showing up as later drives was because I was assuming it was unmounting correctly and it wasn't. So the next time I turned it on it would just use the next available drive letter? Maybe? Dunno. I have never had any problems with my two cd drives mounting and unmounting in this fashion, but I can stick to cl mount/umount for the camera.

If you have any more ideas I'd still like to hear them, and if I have any other problems with this issue I'll certainly repost in this thread.

Regards,
Tim
 
Old 12-09-2006, 08:17 PM   #7
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
If it didn't umount the thing properly when you disconnected, that would indeed explain why it would go to the next drive letter.

On an unrelated note, I'm a Tim too!
 
Old 12-09-2006, 08:40 PM   #8
sunman
Member
 
Registered: Jun 2005
Distribution: Slackware64 13.0 (multilib)
Posts: 67

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by tuxdev
On an unrelated note, I'm a Tim too!
Everyone should be, glad to meet another Tim I don't know why, but I was happy the first time I ever watched python's holy grail and learned the crazy wizard was a Tim too.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to mount digital camera grinch Linux - Hardware 3 09-01-2006 07:10 PM
mount a photographic digital camera??? hraposo Ubuntu 3 08-11-2006 10:16 PM
mount digital camera? Okie Slackware 10 06-25-2005 11:15 AM
Help! Can't Mount Kodak Digital Camera Dooley Mandriva 4 12-18-2004 12:52 PM
can mount mount digital camera but gphoto can't detect it luxitan Linux - Hardware 1 11-13-2004 05:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration