SELinux and VBOXSF Headaches...
Posted: 28. Aug 2011, 01:42
Here is my situation:
HOST: Windows 7
GUEST: Scientific Linux 6.1 (RedHat Clone)
I do Web Application Development. For the most part, I like to edit source files in Windows, using something like Eclipse or Zend Studio. I like to link my source directories with the Guest OS, via shared folders. In the past, I have set this up -- mounting the shared directories directly in my /var/www/html directory. This allows me to edit content and windows and see the changes instantly in my Linux Guest.
The problem: When the shared folder is mounted using VBOXSF, the security context is wrong (and apache is not allowed access). Under normal circumstances, I would just update the security context using chcon, for example:
chcon -R -t httpd_sys_content_t /var/www/html/helloworld
However, this does not work in this situation. The other option is to change the security context during the mount operation. For example,
# mount -t vboxsf helloworld /var/www/html/helloworld -o context="system_u:object_r:httpd_sys_content_t:s0"
Unfortunately, mount.vboxsf does not seem to support "context" as an option.
How are other folks changing the default context of virtualbox shared folders? I would like to leave SELinux on.
http://docs.redhat.com/docs/en-US/Red_H ... stems.html
HOST: Windows 7
GUEST: Scientific Linux 6.1 (RedHat Clone)
I do Web Application Development. For the most part, I like to edit source files in Windows, using something like Eclipse or Zend Studio. I like to link my source directories with the Guest OS, via shared folders. In the past, I have set this up -- mounting the shared directories directly in my /var/www/html directory. This allows me to edit content and windows and see the changes instantly in my Linux Guest.
The problem: When the shared folder is mounted using VBOXSF, the security context is wrong (and apache is not allowed access). Under normal circumstances, I would just update the security context using chcon, for example:
chcon -R -t httpd_sys_content_t /var/www/html/helloworld
However, this does not work in this situation. The other option is to change the security context during the mount operation. For example,
# mount -t vboxsf helloworld /var/www/html/helloworld -o context="system_u:object_r:httpd_sys_content_t:s0"
Unfortunately, mount.vboxsf does not seem to support "context" as an option.
How are other folks changing the default context of virtualbox shared folders? I would like to leave SELinux on.
http://docs.redhat.com/docs/en-US/Red_H ... stems.html