Problems with file permissions in Docker containers with the userns-remap functi
-
I’ve configured Docker to use user namespace remapping (userns-remap) with the following settings:
{
"userns-remap": "dockremap",
"no-new-privileges": true,
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "3"
}
}The /etc/subuid and /etc/subgid files include:
dockremap:100000:65536I’m deploying a WordPress application using the following docker-compose.yml:
services:
wordpress:
image: wordpress:6.7-php8.1-apache
container_name: wordpress
restart: unless-stopped
ports:
- "8080:80"
environment:
WORDPRESS_DB_HOST: ${WORDPRESS_DB_HOST}
WORDPRESS_DB_USER: ${WORDPRESS_DB_USER}
WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD}
WORDPRESS_DB_NAME: ${WORDPRESS_DB_NAME}
WORDPRESS_DEBUG: ${WORDPRESS_DEBUG}
volumes:
- wordpress_data:/var/www/html
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
db:
image: mariadb:10.6
container_name: wordpress_db
restart: unless-stopped
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
volumes:
- db_data:/var/lib/mysql
volumes:
wordpress_data:
db_data:I’m encountering issues with file and directory permissions, particularly when attempting to upload backups or import data into the WordPress instance using various plugins. The errors suggest permission problems, but I haven’t been able to pinpoint the exact cause.
Given that Docker volumes are in use, should I be aware of any specific considerations regarding file and directory permissions?
Despite these adjustments, the issue persists. Are there other configurations or best practices I should consider to resolve these permission problems?
I was trying this Plugins currently:
BackWPup and All-in-One WP MigrationAll-in-One WP Migration i cant upload anythink, it just shows 0.0% all time long without any error msg.
BackWPup gives me just a “HTTP Error.”
This is all the reason why I suspect that I have a fault.Logs from BackWPup just shown this:
a:5:{s:12:"project_root";s:14:"/var/www/html/";s:12:"project_temp";s:49:"/var/www/html/wp-content/uploads/backwpup-restore";s:14:"extract_folder";s:57:"/var/www/html/wp-content/uploads/backwpup-restore/extract";s:14:"uploads_folder";s:57:"/var/www/html/wp-content/uploads/backwpup-restore/uploads";s:6:"locale";s:5:"de_DE";}
The topic ‘Problems with file permissions in Docker containers with the userns-remap functi’ is closed to new replies.