I am copying a set of files to a directory on which the SD card is mounted via
$ cp -a * /media/BOOT
but I get
cp: cannot create regular file '/media/BOOT/u-boot.img': Permission denied
With sudo
$ sudo cp -a * /media/BOOT
I get
cp: failed to preserve ownership for '/media/BOOT/u-boot.img': Operation not permitted
But in the /media/BOOT, I'm already seeing the files being copied but with different permissions.
// source permissions
-rwxrwx--- 1 root vboxsf 367496 Aug 10 22:46 u-boot.img
// destination permissions
-rwxr-xr-x 1 root root 367496 Aug 10 22:46 u-boot.img
- Does anyone see why I'm getting the error and why are files being copied despite that?
- Is the change in permissions also why I can't possibly boot the boot image off the SD card?
Does running chmod 777 in the destination folder sound like a good idea?
OS: 18.04.1-Ubuntu
SD card partition FS: vfat
Using it on a virtualbox but shouldn't matter
Edit:
Tried this solution but no luck!