How to change the ownership of files mounted from floppy image
I have mounted a floppy image file as below
$> /sbin/losetup /dev/loop0 /mnt/win_e/images/grubdos.img
$> mkdir /mnt/floppy
$> mount /dev/loop0 -o loop /mnt/floppy
Floopy image mounted on "/mnt/floppy", now I have tried to create a file inside the floppy image, file created successfully, however I can not change the ownership of the file.
$> cd /mnt/floppy
$> touch hai.txt
$> ll hai.txt
-rwxr-xr-x 1 root root 0 Mar 8 17:29 hai.txt
$> chown user1:user1 hai.txt
chown: changing ownership of 'hai.txt': Operation not permitted
How to change the ownership of the file and folder in mounted floppy image ?
From the ls-ltr i see the file hai.txt has root as its group & owner. you didn't say what linux you are using. You need root privilages for changing the ownership
login to root and try
#chown user1:user1 hai.txt
or try with sudo command
$sudo user1:user1 hai.txt
Thanks for your reply.
Try using su - instead or login to root account and see if it works
|All times are GMT -5. The time now is 09:29 AM.|