...
Code Block | ||
---|---|---|
| ||
cd /opt/web/php/ sudo mkdir ./tmp/ ./logs/ sudo chown -R serveradmin:www-data ./tmp/ ./logs/ sudo chmod -R u+rwX,g+r-w+XrwX,o-rwx ./tmp/ ./logs/ |
Note the PHP process runs under Apache as the www-data data which belongs to the www-data group. Giving the www-data group write access effectively grants the PHP process the required write access.
...