Open sajjadG opened 1 month ago
If the dir exist with the right owner and permissions then it works
# mkdir -p wp/blog/
# chown -R www-data:www-data wp/
# docker run -it --rm --user www-data -v ./wp:/var/www/html -w /var/www/html/blog wordpress
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.5. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.5. Set the 'ServerName' directive globally to suppress this message
[Fri Jun 07 08:00:34.917602 2024] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.59 (Debian) PHP/8.2.20 configured -- resuming normal operations
[Fri Jun 07 08:00:34.918542 2024] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
If the dir exist with the right owner and permissions then it works
This is expected -- if we're running as non-root (--user www-data
), we can't automatically fix this in any way. :sweat_smile:
Following this solution https://github.com/docker-library/wordpress/issues/221#issuecomment-356457710 for changing wordpress to a subfolder, if I run the container with default user (root) everything works fine but if I set the user to anything else (whether the user exist in the image or not, or if the user has the permissions to the parent dir that the new dir is going to be created in), it can not create that dir and copy the wordpress files to it.