Shallow Thoughts

Akkana's Musings on Open Source, Science, and Nature.

Sat, 01 Apr 2006

Silly, Pictures Aren't Executable!

When I plug in my camera (or flash card reader) to upload photos, they always upload as executable. I knew there must be an easy way to fix it, and finally got around to it.

I'm sure you are fully capable of reading man pages and figuring this out, just like I was. (Hint: the solution is in man mount.) But wouldn't you rather have it just spoon-fed to you? (I know I would have.) So here it is: you need the fmask option to mount. It's a mask, so you set it to the bits you don't want set when you mount the filesystem (on top of your normal umask).

My /etc/fstab entry for my camera or other flash card device now looks like this:

/dev/sda1  /pix  vfat  rw,user,fmask=111,noauto  0 0
(On the laptop it's sdb1 because the built-in memory stick reader always grabs sda.)

Tags: ,
[ 21:39 Apr 01, 2006    More linux | permalink to this entry ]