-1

I'm trying to keep SELinux enforcing but to allow NGINX to directly access shared OSX folders that are connected via Parallels Desktop.

  • Host system: Mac OSX 10.10
  • Parallels Desktop: 10
  • Running Virtual OS: CentOS 7 (minimal / command line)

I have the the Parallels tools installed and in CentOS I see the shared folder: /media/psf/Shared-Folder

When I set the Nginx server root to that folder I get a 403 Forbidden. I know it is a configuration parameter that needs editing because if I change SELinux to Permissive, the files are served correctly in NGINX.

When checking how the files are mounted I see this:

root root system_u:object_r:removable_t:s0 /media/psf/Shared-Folder/

I can see the 'removable_t' context - however - my issue is that I cannot seem to find a way to allow the httpd service to serve files that are mounted as removable storage.

I have tried:

chcon -R -t public_content_t /media/psf/Shared_Folder/

chcon -R -t httpd_sys_content_t /media/psf/Development-Projects/

and in all cases I get a "chcon: failed to change context of: '...': Operational not supported" error.

Checking /usr/sbin/getsebool -a | grep http I do not see any option to allow httpd to access removable storage mounts.

Last item: I do not believe I can change the way Parallels mounts the shared folders.

Question: Is there a way to keep SELinux enforcing but to allow NGINX to directly access shared OSX folders that are connected via Parallels Desktop?

1 Answers1

0

What you need to do is use semanage.To get it you have to install policycoreutils-python. The same type of question has already been asked Here. Cheers!

Community
  • 1
  • 1
skip87
  • 529
  • 1
  • 7
  • 27