Selinux Prevented Httpd(Usr/Sbin/Httpd) Write Access to /Var/Www/HTML/Bookings/Templates_C

SELinux prevented httpd(usr/sbin/httpd) write access to /var/www/html/bookings/templates_c

You can allow it by using setsebool -P httpd_unified=1

Normal SELinux settings for http to work with PHP more or less properly are:

setsebool -P httpd_enable_cgi on
setsebool -P httpd_unified on
setsebool -P httpd_builtin_scripting on

Otherwise you can use

getsebool -a | grep httpd

To get a list of httpd-related EeLinux options and tweak to your personal taste.

Laravel Socialite Facebook can't get user details

When I set up my server, the machine generated an SE Linux Error, saying that httpd service tried to save in logs of laravel.

I noticed this error later and stackoverflowed the error, finding the following solution.

SELinux prevented httpd(usr/sbin/httpd) write access to /var/www/html/bookings/templates_c

Did as said in the question and voila! Done!

Jenkins wrong volume permissions

The problem is, that your user in the container has different userid:groupid as the user on the host.

you have two possibilities:

  1. You can ensure that the user in the container has the same userid:groupid like the user on the host, which has access to the mounted volume. For this you have to adjust the user in the Dockerfile. Create a user in the dockerfile with the same userid:groupid and then switch to this user https://docs.docker.com/engine/reference/builder/#user

  2. You can ensure that the user on the host has the same userid:groupid like the user in the container. For this, enter the container with docker exec -it <container-name> bash and show the user id id -u <username> group id id -G <username>. Change the permissions of the mounted volume to this userid:groupid.



Related Topics



Leave a reply



Submit