I was having trouble uploading images to Wordpress, but I succeeded by changing the folder permissions.
Wordpress image files will be uploaded to / home/kusanagi/project/DocumentRoot/wp-content/uploads
.
Change the permissions here.
First, log in to Docker's ftp container
$ docker-compose exec ftp sh
The following is the work inside the ftp container.
/ # cd /home/kusanagi/project/DocumentRoot/wp-content
/home/kusanagi/project/DocumentRoot/wp-content # find uploads -type d -exec chmod 775 {} +
/home/kusanagi/project/DocumentRoot/wp-content # ls -al
total 40
drwxr-xr-x 9 kusanagi 1001 4096 Oct 11 03:42 .
drwxr-xr-x 5 kusanagi 1001 4096 Dec 20 14:41 ..
-rw-rw-rw- 1 kusanagi 1001 28 Aug 5 05:53 index.php
drwxr-xr-x 4 kusanagi 1001 4096 Dec 20 14:41 languages
drwxr-xr-x 3 kusanagi 1001 4096 Jul 16 10:24 mu-plugins
drwxr-xr-x 5 kusanagi 1001 4096 Dec 20 14:37 plugins
drwxr-xr-x 8 kusanagi 1001 4096 Dec 20 14:41 themes
drwxr-xr-x 2 1001 1001 4096 Dec 20 14:41 translate-accelerator
drwxr-xr-x 2 kusanagi 1001 4096 Dec 20 14:41 upgrade
drwxrwxr-x 11 kusanagi 1001 4096 Aug 7 10:16 uploads
This should work.
Recommended Posts