You are not logged in.
Hello,
I want to install drupal on my LEMP stack on localhost on a virtual machine(using Virtualbox version 6.1).
I followed this guide in the archwiki for nginx running it as unprivileged user and did the same for php-fpm https://wiki.archlinux.org/title/Nginx# … ng_systemd.
i created the user www which should be the equivalent to www-data.
ps -aux | grep nginx
www 329 0.0 0.0 9400 1268 ? Ss 02:37 0:00 nginx: master process /usr/bin/nginx -gpid /run/nginx/nginx.pid; error_log stderr;
www 330 0.0 0.1 10120 3624 ? S 02:37 0:00 nginx: worker process
ps -aux | grep php-fpm
www 325 0.0 1.2 295136 24912 ? Ss 02:37 0:00 php-fpm: master process (/etc/php/php-fpm.conf)
www 344 0.0 1.1 305944 23020 ? S 02:37 0:00 php-fpm: pool www
www 345 0.0 1.3 310336 27464 ? S 02:37 0:00 php-fpm: pool www
note for php-fpm i also needed to change the /etc/php/php-fpm.d/www.conf
based on this https://bugs.archlinux.org/task/64683
i replaced this
;listen.acl_users =
;listen.acl_groups =
with
listen.acl_users = www
listen.acl_groups = www
maybe how i created the user is the point?
useradd -r -M -s /bin/false www
what i did was i used chown to change the permission of sites/default to www:www
chown -R www:www default
and it still complains that the directory is not writable
afterwards i tried this:
chmod -R 777 default
and it still complains that it doesnt have write access to sites/default
i also tried
chown -R www:www html
find html -type d -exec chmod 770 {} +
find html -type f -exec chmod 640 {} +
and this gave me a 404 not found error this showed me that nginx couldn't access the files even if www(nginx,php-fpm) is the owner or in the group of the file.
Last edited by maro (2021-05-14 18:37:02)
Offline
I solved it by creating a dir at / called web changed the acl settings of that dir changed my web config accordingly and it works, it didnt work probably because the path got blocked by some directory in the way.
Offline