Translate

Search This Blog

-bash: cd: /media/sf_ : Permission denied mount host shard folder in oracle virtual box

Error:   -bash: cd: /media/sf_vmshare: Permission denied

Created a host folder as shared directory in Oracle Virtual box and specified auto mount option. When non root user tried to access thsi directoty above error -bash: cd: /media/sf_vmshare: Permission denied was returned. Remedy was to create a directory in that non root user and mount the shared hsot directory in that directory.  Ofcourse first the auto mount directory has to be dismounted.

E
[oracle@node1 ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5              13G  7.1G  5.0G  59% /
tmpfs                 1.2G  223M  907M  20% /dev/shm
/dev/sda1              73M   29M   41M  41% /boot
/dev/sda2            1008M  260M  698M  28% /tmp
vmshare               1.7T  193G  1.5T  12% /media/sf_vmshare
[oracle@node1 ~]$ cd /media/sf_vmshare
-bash: cd: /media/sf_vmshare: Permission denied

REMEDY:

 [oracle@node1 ~]$ mkdir ~/vmshare
[oracle@node1 ~]$ su - root
Password:
[root@node1 ~]# umount vmshare
[root@node1 ~]# mount -t vboxsf   vmshare  /home/oracle/vmshare/
[root@node1 ~]# exit
logout
[oracle@node1 ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5              13G  7.1G  5.0G  59% /
tmpfs                 1.2G  223M  907M  20% /dev/shm
/dev/sda1              73M   29M   41M  41% /boot
/dev/sda2            1008M  260M  698M  28% /tmp
vmshare               1.7T  193G  1.5T  12% /home/oracle/vmshare/
[oracle@node1 ~]$ cd /home/oracle/vmshare/
[oracle@node1 vmshare]$ touch abc

Follow by Email