My nginx and php-frm were working fine. Till I installed sudo and tried to add my user to sudoers group. now php-fpm throws permission errors. Commands:
Help please..
Edit:
I may have also screwed up www user permissions: hp-fpm isn't able to read/write the file /var/run/php-fpm.pid?
Code:
#install sudo
pkg install sudo
#attempt to add to sudo
su - ; visudo ; Added line "username All=(ALL) ALL" . This didn't help
#attempt to add to sudo again:
"sudo pw usermod -G wheel -n username". Then "sudo pw usermod -g username -G wheel -n username" . Then added "%freekhill ALL=(ALL) ALL" visudo .
"sudo ls" works.
#restart services throws error
service php-fpm stop -> "php_fpm not running? (check /var/run/php-fpm.pid)."
service php-fpm start -> "Another FPM instance seems to already listen on /var/run/php-fpm.sock" .
/var/run/php-fpm.sock is defiend in the php-fpm conf file. Not sure where the pid file is coming from...
Edit:
I may have also screwed up www user permissions: hp-fpm isn't able to read/write the file /var/run/php-fpm.pid?
Code:
srw-rw---- 1 www www 0 Mar 26 16:59 /var/run/php-fpm.pid
Code:
"sudo -u www rm /var/run/php-fpm.pid" # rm: /var/run/php-fpm.pid: Permission denied