Cannot change permissions of folders within vagrant home folder

前端 未结 7 2099
抹茶落季
抹茶落季 2020-12-04 08:50

When I ssh in to my vagrant vm, I can change permissions of files and folders above and outside the vagrant user folder, and for files within the vagrant user folder. But ca

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-04 09:21

    Change the permissions form the host not the guest. VirtualBox disallows changing permissions on shared files form a guest os.

    TLDR; The issue is not that the users on your guest don't have permissions to access your host files. The issue is the executing user of the virtaul box process on your host does not have permissions to write the files in the host. There are two sets of permissions. The guest permissions have to be set just like any other os. You also have to make sure that the virtual box process your guest os is running in has permissions to that folder. If that process only has read access the most any guest user will be able to do is read.

提交回复
热议问题