Permission Denied on mkdir php with nginx -
i struggling issue on lemp stack. cannot make nginx user create directory via php script.
my stack rhel 7.2 nginx mariadb php
i installed stack , used following code creating directory in index.php
<?php echo(exec("whoami")); mkdir("test",0777,true); $error=error_get_last(); echo $error['mssage']; ?>
output nginx mkdir(): permission denied
nginx excecutes php
via nginx
user.
applied 'chown -r nginx: nginx <working folder>' applied 'chmod -r 0777 <working folder>
but above script gives same permission denied error.
my plan install wordpress , import sites web server. since permission denied on working folder of nginx , wordpress not able create new directories or move content 1 folder other.
set selinux disabled or permissive in /etc/selinux/config
if selinux has enforcing, use semanage change context of mysql datadir , contents.
shell> sestatus
selinux status: enabled selinuxfs mount: /selinux current mode: enforcing mode config file: enforcing policy version: 24 policy config file: targeted
then have selinux on.
other possible tips:
http://forums.mysql.com/read.php?20,591661 (mysqld service won't start after server move) http://forums.mysql.com/read.php?20,568810 (mysql load data local infile) http://forums.mysql.com/read.php?52,275498 (can't connect mysql server on '192.168.1.197' (13)) http://forums.mysql.com/read.php?52,252406 (php remote connection issue)
Comments
Post a Comment