I am using Ubuntu on Virtual Box and I have a folder which is shared between the host (Windows) and the VM (Ubuntu). When I open any file in the share folder in Ubuntu, I can not change it as its owner is set to root.
How can I change the ownership to myself?
Here is the output of ls -l
:
-rwxrwxrwx 1 root root 0 2012-10-05 19:17 BuildNotes.txt
The output of df
is:
m@m-Linux:~/Desktop/vbox_shared$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 29640780 10209652 17925440 37% /
none 509032 260 508772 1% /dev
none 513252 168 513084 1% /dev/shm
none 513252 88 513164 1% /var/run
none 513252 0 513252 0% /var/lock
none 513252 0 513252 0% /lib/init/rw
Ubuntu 214153212 31893804 182259408 15% /media/sf_Ubuntu
/dev/sr0 53914 53914 0 100% /media/VBOXADDITIONS_4.2.0_80737
Ubuntu 214153212 31893804 182259408 15% /home/m/Desktop/vbox_shared
The options in VM is automount and the readoly is not checked.
Tried to use /media/sf_Ubuntu
, but getting permission error:
m@m-Linux:/media$ ls -l
total 10
drwxrwx--- 1 root vboxsf 4096 2012-10-23 15:35 sf_Ubuntu
drwxrwx--- 2 root vboxsf 4096 2012-10-21 23:41 sf_vbox_shared
dr-xr-xr-x 6 m m 2048 2012-09-13 07:19 VBOXADDITIONS_4.2.0_80737
m@m-Linux:/media$ cd sf_Ubuntu/
bash: cd: sf_Ubuntu/: Permission denied
m@m-Linux:/media$ cd sf_vbox_shared/
bash: cd: sf_vbox_shared/: Permission denied
Please note that I am in the group vboxsf
:
m@m-Linux:~$ id
uid=1000(m) gid=1000(m) groups=4(adm),20(dialout),24(cdrom),46(plugdev),105(lpadmin),119(admin),122(sambashare),1000(m),1001(vboxsf)
df
and the command you used to manually mount the filesystem.