...
After rebooting a Red Hat Linux guest that runs SELinux, shared folders no longer appear under the /mnt/hgfs folder. The virtual machine's preferences, however, show the folder as being shared.
There are three solutions you can use to work around this problem. Note: VMware does not disable SELinux. Solution 1: Restart vmware-tools Open a terminal window and run the following command as root to restart vmware-tools. You need to do this after you boot the virtual machine, each time. [root@linux_vm]# /etc/init.d/vmware-tools restart At boot, VMware's vmware-guestd process runs within the Red Hat/SELinux security context initrc_t. When the process runs in this context, it does not have the necessary privileges to mount(2) /mnt/hgfs and, therefore, your shared folders do not show up. When you restart the VMware services after boot, they run within the default unconfined_t context for non-targeted processes within Red Hat's default "targeted" SELinux policy. Running under this context provides the needed privileges to mount(2) the hgfs shared folders. Solution 2: Disable SELinux (not recommended) Disable SELinux by supplying the selinux=0 parameter to the kernel in the grub.conf file by running this command: kernel /vmlinuz-2.6.xxx_FC4 ro selinux=0 Caution: Restarting VMware's services simply restarts the vmware-guestd process, which allows it to successfully complete the mount(2) as described above. Setting selinux=0 in your grub.conf file disables SELinux entirely and removes the security checks that cause the boot-time mount(2) from failing. This second solution also disables all SELinux-associated security checks and should only be used if you are certain that you do not need them in your virtual machine. Solution 3: Modify vmware-tools (advanced users) Another option is to modify the /etc/init.d/vmware-tools file to run vmware-guestd within a specific context using the /usr/bin/runcon command. You can do this with something similar to the following in the vmware_start_guestd() function of the init.d file: /usr/bin/runcon -t unconfined_t -- /path/to/vmware-guestd \--background /path/to/vmware-guestd.pid Note: You need to replace the paths with the variables that show up in that file. The command is shown split across 2 lines with a newline escape character (\). Warning: This solution might cause warning messages or failure to remove the vmware-tools file when uninstalling or upgrading VMware Tools because the file has been modified. Make sure you keep a copy of the original vmware-tools file before editing it. Additional Information For translated versions of this article, see: 简体中文: 共享文件夹在运行 Red Hat Linux 和 SELinux 的虚拟机上不显示 (2120901)