I had installed CentOS as guest operating system in VirtualBox.

Now I have been mostly experienced with Ubuntu and CentOS is though similar has some differences.

Now I was trying to mount a windows shared folder named vmshare-windows. For this I first tried to create a folder under /mnt named vmshare where I could mount vmshare-windows folder. But when i invoke mnt command to do this I get following error: "mkdir: cannot create directory ‘vmshare’: Permission denied"

As my user was already added to wheel group, I could sudo and create the folder. Next Now when I try to run mount command without sudo I get same permission denied errors. I then checked that the user and group of created vmshare folder are both root. So I have to sudo again to mount.

Now the issue is whenever I have to modify anything in mounted folder I have to sudo which is defeating whole purpose of my user who basically should have administration privileges.

So I then changed Account type of my logged in user to Administrator and restarted my system. However without sudo I still cannot mount or modify anything in mounted folder.I then added my logged in user to root group. But the result is still the same: I must use sudo

So the question is what is it that I have to do to make sure I can mkdir/mount/unmount/modify inside the mnt folder without resorting to sudo each and every time.

1 Answer 1


Use uid and gid options for mount:

mount -t vboxsf -o gid=33,uid=33 vmshare-windows /mnt/vmshare-windows
  • I get following error on trying this command: mount: only root can use "--options" option
    – nurabha
    Aug 9, 2017 at 14:09
  • mount can only be done by root, use sudo, su etc.
    – sebasth
    Aug 9, 2017 at 14:13

You must log in to answer this question.

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