I suspect your issue is that you are mounting the vfat filesystem so that it is only accessible to the root
user.
The vfat filesystem (being a very simple filesystem dating from the ancient days of DOS) has no concept of users and groups, but all files in UNIX systems must have an owner and group. To work around this, the Linux vfat driver defaults to making all directories and files on a mounted vfat filesystem owned by root
(with group root
). Mode 775 (which you set on the mount-point after mounting the partition) means that it should be writeable by the owner (in this case root
) and by members of the group (also root
), but not by "others" ... including your unprivileged pi
user (which I assume you're logged on as).
Hence, running raspistill -q 90 -t 1000 -o /mnt/images/test.jpg
fails, but I'd bet that running sudo raspistill -q 90 -t 1000 -o /mnt/images/test.jpg
will work just fine (because root
can write to /mnt/images
but pi
can't). You can also confirm this by running ls -ld /mnt
which will probably show something like the following:
drwxrwxr-x 2 root root 4096 Apr 30 2014 /mnt
A better solution that running everything with sudo
would be to mount the partition so that all the files and directories on it appear to be owned by the pi
user. This can be accomplished quite easily by tweaking your /etc/fstab
entry. Just change the defaults
item to uid=pi,gid=pi
and reboot. In other words, the line should look like this afterward:
/dev/sda1 /mnt vfat uid=pi,gid=pi 0 0
Once you've rebooted you should find that ls -ld /mnt
shows something like this instead:
drwxr-xr-x 2 pi pi 4096 Apr 30 2014 /mnt
At this point, your raspistill
command should work without sudo
.
cp test.jpg /mnt/images/test.jpg
works