Host machine: OS X El Capitan

Virtual machine: Linux Red Hat(64-bit) through Virtual Box

Goal: share folder on Mac, so when I change files on host machine, they will be changed on the virtual machine also.

Error: mount error(13) permission denied.

What I've already done and tried:

  • I've shared folder on host machine: share with everyone with read-write permissions.
  • I've run this command: sudo mount -t cifs // /var/www/apps/ia -o username="arsenpr",password="pass"
  • I've tried to put sec= option as other people suggested, also I've tried to delete parentheses around username and password.
  • Also I assumed that I've used some other username(which was too odd, but gave it a try) - didn't work. I asked my terminal whoami and it answered 'arsenpr'

None of the above helped me.. I've spend 2 days trying different things, different flags and reading man mount.

Why I am not thinking about giving up is because it does work if I run the same virtual machine on Windows host machine and do exact the same thing. It worked just right away with the command in the second point, though I have domain name on my windows machine and I also added ,domain=DOMAINNAME at the end of the command.

Actually I've also tried to put domain while doing it on Mac, but actually I'm not sure what it is and where to look. I looked at System Preferences -> Network -> connected wifi -> advanced -> WINS -> workgroup. But I'm not sure it's the right place to look for domain name of the network.

Any help would be highly appreciated. Ask any additional questions if I missed something. Thanks in advance!


Oh, here what I see today, after reinstalling the system: enter image description here

It event didn't ask for password..


2 Answers 2


Isn't it a problem of permissions ?

On linux after creating a new OS through VB, I always need to add the current user to the vboxsf group in order to be able to mount the shared folder, please post the output of groups $(whoami) ...

To add yourself to vboxsf:

sudo usermod -aG vboxsf $(whoami)
  • where should I run this command? VM? it says usermod: user arsenpr does not exist. $(whoami) on host machine tells 'arsenpr'. Thanks Nov 22, 2015 at 9:26
  • The "Error: mount error(13) permission denied" is on linux (=guest) right ? Then you should issue $(whoami) in a terminal in the guest ... What is the command "groups" saying ?
    – t-bltg
    Nov 22, 2015 at 9:29
  • It says root : root Nov 22, 2015 at 9:31
  • Mmmh please do "cat /etc/passwd" and post the output: it's not advised to work as root, do you have a user account other than root ?
    – t-bltg
    Nov 22, 2015 at 9:33
  • No, I can work only as root user. Nov 22, 2015 at 9:37

When I have a centOS6 on Virtualbox I usually add in /etc/rc.local(guest machine side) a line like this :

mount -t vboxsf -o umask=0000,gid=48,uid=48 name-of-the-shared-folder /path/of/the/mounted/directory

this should mount the shared folder automatically at VM startup.

PS: if you have one you can get your current domain name by opening a terminal and perform eg. the following command:


UPDATE from Arseni Prokharchyk:

I should say, that without neok's answer this one didn't work for me.

  • Thanks for the answer. Which umask, gid and uid I take? Host's? Nov 21, 2015 at 23:06
  • Unfortunately it didn't work.. Nothing happened. I rebooted my VM and edited one of the files in the folder on host machine - it didn't change the file on the VM.. ( Nov 21, 2015 at 23:14
  • are guest additions properly installed?
    – lese
    Nov 21, 2015 at 23:18
  • Not sure, how to check this? Nov 21, 2015 at 23:22
  • and why do I need this if it mount works on windows host? Thanks Nov 21, 2015 at 23:45

You must log in to answer this question.

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