I've installed Virtualbox 4.3.20 then Ubuntu 14.04 on a PC running Win7, following these instructions, including the guest additions. I created a shared folder, added myself to the vboxsf group, and can see files on my PC via Ubuntu. However, now matter which variant I try of the many solutions posted online, I'm not able to change the permissions, group or owner of these files, or to replace them inline.
Here's what I observe:
Here's the setup in Virtualbox.
Here's what I've tried so far:
I don't think I'm trying to do anything unusual. Thanks.
Here's what I observe:
- The files in the shared folder belong to root (group=vboxsf); chmod and sudo chmod don't produce an error but don't have any impact.
- Trying to replace a file inline (perl -i.bak) produces "Can't rename file to file.bak: Text file busy, skipping file.".
- I can create files and move existing files. I can also delete and copy files, but the copies inherit the permissions of the originals. Yes, I do see the obvious workaround.
Here's the setup in Virtualbox.
- Storage
- Controller: IDE
- VBoxGuestAdditions.iso (IDE Primary Master, no live CD)
- Empty (IDE Secondary Master, no live CD)
- Controller: SATA
- ubuntu-14.vhd, 8 GB virtual, 6 GB actual, dynamically allocated
- Controller: IDE
- Shared Folders
- Machine folders
- Name: PC
- Path: c:\Users\first.last
- Automount: yes
- Access: Full
- Read-only: no
- Machine folders
Here's what I've tried so far:
- Edit /etc/fstab and add "PC /media/sf_PC vboxsf rw,umask=002,gid=1000,uid=1000,auto 0 0"
- tried this with and without automount above, and with remount as an option to override automount
- tried smbfs instead of vboxsf
- tried with or without the auto, rw and gid options
- Outcome: I see the drive flashing in the docker at every change, but nothing happens to the file permissions. In addition, whenever I reboot after any of these additions to fstab, I get "An error occurred while mounting /media/sf_PC".
- Edit /etc/mtab.
- Outcome: this does nothing. Every time I reboot, mtab is overwritten.
- Edit /etc/rc.local and add "sudo mount -t vboxsf -o rw,umask=002,uid=1000,gid=1000 PC /media/sf_PC". Remove automount option from VM.
- Outcome: this makes me the owner and group of files, but I still can't change permissions or edit files in place. Setting gid to 999 makes the group vboxsf but the outcome is the same.
- Chown -R of /mnt/sf_PC, either before or after mounting.
- Outcome: this does not accomplish anything.
I don't think I'm trying to do anything unusual. Thanks.