SElinux is a pain as it is but i love the security so i am sticking with it but i am not sure what the right approach is when it goes to dev programming on my local network. I am not worried about security but i do not want to use git to transfer files over.
I configured laravel on apache and setup the proper (at least i think so) permissions for the laravel folder and the folder permissions for storage and bootstrap/cache. I also configured samba so i can connect to that laravel folder and do my changes lives and not have to commit anything to git to see them live on the server after pushing and pulling which is a huge waste of time.
However i am running into issues because i cannot save my changes to the log files i clear since they are asigned to the apache user and the files in the app folder are owned by root but i still cannot change them over the network.
here are my selinux permissions. Any feedback?
setsebool -P httpd_can_network_connect_db=1
setsebool -P httpd_enable_homedirs=1
setsebool -P httpd_can_network_connect=1
chown -R apache:apache /var/www/html/zeintek/merlin/back_end/storage
chmod -R 775 /var/www/html/zeintek/merlin/back_end/storage
chown -R apache:apache /var/www/html/zeintek/merlin/back_end/bootstrap/cache
chmod -R 775 /var/www/html/zeintek/merlin/back_end/bootstrap/cache
semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/zeintek/merlin/back_end/storage(/.*)?"
semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/zeintek/merlin/back_end/bootstrap/cache(/.*)?"
semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/zeintek/merlin/back_end/config(/.*)?"
restorecon -Rv /var/www/html/zeintek/merlin/back_end/
restorecon -F -r '/var/www/html/zeintek/merlin/back_end/'
chcon -R -t httpd_sys_rw_content_t '/var/www/html/zeintek/merlin/back_end/storage'
chcon -R -t httpd_sys_rw_content_t '/var/www/html/zeintek/merlin/back_end/bootstrap/cache'
Do i need restorecon? Not sure what it does here…
Can you guys please tell me how you setup your dev env to allow changes?