Directory Permission Change Not Working
Solution 1
As the directory is shared by the host, the permission change should be applied on the host system (Mac) not the guest (Ubuntu) where the folder is mounted. The method of adding the user to the group vboxsf won't work in this special case I think because the Mac won't know about the Ubuntu user so the chmod 777 (rwxrwxrwx) is the way to go.
Solution 2
I know it's not quite answering the question as asked, but from the looks of things, adding any users which need that access to group "vboxsf" might actually be the better way to go. The command:
usermod -aG vboxsf user
should do the trick, assuming the user you want to give access to is named "user". After that, try writing to the directory as the user. I think it should work.
Related videos on Youtube
Comments
-
GChorn over 1 year
I'm sure I'm missing something quite basic here, but I'm running Ubuntu through Virtual Box on my Mac, and so I need to give my Ubuntu user read/write access to the folder shared by the host and guest systems (named sf_VB_Shared_Folder). I performed and got the following:
user@user-VirtualBox:/media$ ls -l total 0 drwxrwx--- 1 root vboxsf 68 Aug 3 07:59 sf_VB_Shared_Folder user@user-VirtualBox:/media$ sudo chmod ugo+rwx sf_VB_Shared_Folder user@user-VirtualBox:/media$ ls -l total 0 drwxrwx--- 1 root vboxsf 68 Aug 3 07:59 sf_VB_Shared_Folder
Why are the permissions not changing?
-
GChorn almost 12 yearsI tried your command without sudo and got
usermod: cannot lock /etc/passwd; try again later.
Then I tried with sudo, didn't get any errors, but when I try to cd into the directory I still getbash: cd: sf_VB_Shared_Folder: Permission denied
. -
laurent almost 12 yearsyou need to log out and log in for the new group attribution to take effect.
-
GChorn almost 12 yearsTHANKS!!! chmod 777 from the Mac terminal worked like a charm.
-
lrepolho over 9 yearsIt worked like a charm, tks. In my case i used it to grant permission to puppet user