Docker volume permission

Dear team,

I just deploy docker wordpress;
version: “3”

services:
dbwp:
image: mariadb:latest
container_name: dbwp
volumes:
- dbwp_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD=123456
MYSQL_PASSWORD=123456
MYSQL_DATABASE=wordpress
MYSQL_USER=wordpress

wordpress:
depends_on:
- dbwp
image: wordpress:latest
container_name: wordpress
volumes:
- wordpress_data:/var/www/html
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
ports:
- “80:80”
restart: always
environment:
MYSQL_PASSWORD=123456
MYSQL_DATABASE=wordpress
MYSQL_USER=wordpress
MYSQL_HOST=dbwp

volumes:
dbwp_data: {}
wordpress_data: {}

But when upload new theme is have issue write permission as images attach

I have to login docker and change owner with this command:
#chown -R 1000:1000 /var/www/html

but still not success. Please help how to fix.

Thanks

Henry

Give access to the folder: sudo chmod -R 777 wp-content/ and check again

1 Like

Thansk. It work for me.