Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I plug a camera to ubuntu 11.10. It is automatically recognized and browsed with nautilus or through terminal. But when I copy files to my camera no copying happened. How can files be written to the camera?

share|improve this question
    
what kind of camera? –  Journeyman Geek Dec 31 '11 at 5:15

2 Answers 2

You can choose different ways:

You can give write permission to mounted folder

Let say /media/cam is our mounting dir:

You can give sudo chmod 777 /media/cam -R command to make cam memory recursively writable.

Or you can mount your cam manually by giving read/write option to command, like:

Let say /dev/photo is the mountable device (Porbably it appears as /dev/sd**)

mount /dev/photo /media/cam -o defaults,user,rw

Another way is, if user permission is not granted for write, you can try write files as root:

sudo cp * /media/cam

Note: To identify which device your camera is on it may help to use sudo fdisk -l.
(See: http://www.ozzu.com/unix-linux-forum/accessing-usb-camera-ubuntu-without-gdm-running-t84169.html)

share|improve this answer
1  
chmod will be absolutely ineffective when run on FAT (vfat) filesystems, which all cameras use. The fake permissions can only be set at mount time using umask=, fmask= and/or dmask=. –  grawity Dec 30 '11 at 19:16
    
Of course you are right for non-EXT media, but mount point. If mount point permission isn't set right, can't write file. Even can't read anything. Also you're right about umask and fmask/dmask. –  Sencer H. Jan 2 '12 at 13:48
    
After mounting, the original permissions on the mount point do not matter anymore. They are completely ignored; only the mounted filesystem root's permissions are checked. (At least this is the case on Linux.) –  grawity Jan 2 '12 at 14:00
    
I just tried that with my fat32 formatted USB stick. It's automounted by my user. I logged in with other user and try to reach files in stick. But changedir command gives "permission denied". Then I checked mount point: device mounted by my username and granted full permission for my user, but there are no any permissions for group or guests ;) Looks like without giving permissions to others by my user or root, no body can reach to device... I don't say that is absolute, but it's possible.. –  Sencer H. Jan 4 '12 at 10:13

When you say " no copying happened" you either mean:

1) You get a copy permission denied error

or

2) The files appear to copy over but when you unplug the camera they are not there

For case 1, RecNes's answer about mounting the camera will work fine. For case 2, you are removing the camera before it can finish writing to your camera. Run "sync" in the terminal, then remove the camera once the command completes. Or you can run "Safely remove" from nautilus.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.