My application need to save some files from
/media/usb which is my USB stick 32 GB vfat formatted.
When I try:
mv /home/pi/dir/* /media/usb/dir/ it gives me this error :
cp: cannot create regular file ‘file’: Invalid argument " .
I tried mounting the USB Stick either manual, either with fstab, with the following lines added (of course, one at a time and the end of file) :
- /dev/sda1 /media/usb vfat umask=000 0 0
- /dev/sda1 /media/usb vfat rw 0 3
- /dev/sda1 /media/usb vfat defaults,uid=65534,gid=65534,dmask=000,fmask=111 0 0
- UUID=AD4D-8211 /media/usb vfat auto,users,rw,uid=pi,gid=pi 0 0
Neither works for me.
I have success with another ext4 formatted USB Stick with fstab edited: - /dev/sda1 /media/usb ext4 rw 0 3
After many hours of research I return to the conclusion (Transmission: permission denied on USB disk) that vfat do not support the per-user/group permissions and the problem is is FAT filesystem.
I need to save some output from an application to a USB stick and from there the user should read it on Android device. And ... because Android doesn't know to read by default ext4 formatted USB memory, I must accomplish vfat portability.
What am I doing wrong to copy or move some file from Raspberry Pi 2 to USB Stick (FAT32) ?