Got the below error from qemu: Unable to complete install: 'Cannot access storage file '/run/media/msingh/WDELEMENTS1/test/CentOsRestoreTest.qcow2' (as uid:107, gid:107): Permission denied'

So tried to change the ownership as root but it still fails:

[root@centos ~]# chown qemu.qemu /run/media/msingh/WDELEMENTS1/test/CentOsRestoreTest.qcow2
chown: changing ownership of ‘/run/media/msingh/WDELEMENTS1/test/CentOsRestoreTest.qcow2’: Operation not permitted

Info about the path/drive:

[root@centos ~]# df -hT /dev/sda1
Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/sda1      vfat  2.8T   55G  2.7T   2% /run/media/msingh/WDELEMENTS1

VFAT filesystems do not support the notion of file ownership. Instead, when the filesystem is mounted, the mount command sets a uid/gid which are considered to own everything in that filesystem.

Thus, to change the ownership of a VFAT filesystem's contents, you need to unmount the filesystem and remount it with the desired uid/gid.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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