Can create and delete files on mounted file system

2019-08-26 17:28发布

I have a Xubuntu install running in a VM (VirtualBox) on a Windows 10 host. There is a directory on the Windows file system which I have mounted in the guest as a vboxsf. I think it's a Linux problem but that's the background in case it's relevant.

I have write access to this directory and all files within it (everything is -rwxrwxrwx). I can create, modify and delete files and directories in it. But trying to create a soft link (ln -s) or chown a file or directory to a different owner produces the following message:

ln: failed to create symbolic link 'myLink': Read-only file system

Have tried everything I can think of including unmounting and re-mounting. I don't understand how I am able to write, modify and delete files, yet a symbolic link produces "read only". Chown completes without an error or warning, but still hasn't changed ownership when done.

1条回答
Ridiculous、
2楼-- · 2019-08-26 18:13

So eventually I found the answer to this. It's a bug / design decision in VirtualBox itself. See here:

https://www.virtualbox.org/ticket/10085

They used to support it and then realised it enabled a very hard to fix security vulnerability and so deliberately disabled linking in their shared folders. There's no great work around. You can edit your

to add the following:

<ExtraDataItem name="VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME" value="1"/> 

That comes with security risks so you must trust your guest. You can also (and this is what I might do) create an NFS mount point and connect to it in more old school ways.

查看更多
登录 后发表回答