2

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?

3 Answers 3

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.

3
  • I 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 get bash: cd: sf_VB_Shared_Folder: Permission denied.
    – GChorn
    Aug 3, 2012 at 1:06
  • 1
    you need to log out and log in for the new group attribution to take effect.
    – laurent
    Aug 3, 2012 at 1:10
  • It worked like a charm, tks. In my case i used it to grant permission to puppet user
    – lrepolho
    Oct 13, 2014 at 23:41
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.

1
  • THANKS!!! chmod 777 from the Mac terminal worked like a charm.
    – GChorn
    Aug 3, 2012 at 2:58
-1

You can find the answer here. I think this is a duplicate question.

External hard drive not allowing permission

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .