sprintcube / docker-compose-lamp

A basic LAMP stack environment built using Docker Compose.
MIT License
2.64k stars 1.41k forks source link

Write permissions... again #245

Open boelle opened 1 year ago

boelle commented 1 year ago

i have similar issues whne it comes to writing files

i run this on a openmediavault machine using docker

i run the emoncms logging software and with mysql store it works fine, but when it needs to create files and directories it stops

ERROR: Feed could not be created, could not write meta data file fopen(/srv/mergerfs/Data/Emoncms/docker-compose-lamp/emoncmsdata/phpfina/80005.meta): Failed to open stream: No such file or directory

i tried to move the emoncmsdata folder inside the emoncms folder i created in www... still the same issue

# Please Note:
# In PHP Versions <= 7.4 MySQL8 is not supported due to lacking pdo support

# To determine the name of your containers
COMPOSE_PROJECT_NAME=lamp

# Possible values: php54, php56, php71, php72, php73, php74, php8, php81
PHPVERSION=php8
DOCUMENT_ROOT=./www
APACHE_DOCUMENT_ROOT=/var/www/html
VHOSTS_DIR=./config/vhosts
APACHE_LOG_DIR=./logs/apache2
PHP_INI=./config/php/php.ini
SSL_DIR=./config/ssl

# PHPMyAdmin
UPLOAD_LIMIT=512M
MEMORY_LIMIT=512M

# Xdebug
XDEBUG_LOG_DIR=./logs/xdebug
XDEBUG_PORT=9003
#XDEBUG_PORT=9000

# Possible values: mysql57, mysql8, mariadb103, mariadb104, mariadb105, mariadb106
#
# For Apple Silicon User:
# Please select Mariadb as Database. Oracle doesn't build their SQL Containers for the arm Architecure

DATABASE=mysql8
MYSQL_INITDB_DIR=./config/initdb
MYSQL_DATA_DIR=./data/mysql
MYSQL_LOG_DIR=./logs/mysql

# If you already have the port 80 in use, you can change it (for example if you have Apache)
HOST_MACHINE_UNSECURE_HOST_PORT=8081

# If you already have the port 443 in use, you can change it (for example if you have Apache)
HOST_MACHINE_SECURE_HOST_PORT=443

# If you already have the port 3306 in use, you can change it (for example if you have MySQL)
HOST_MACHINE_MYSQL_PORT=3306

# If you already have the port 8080 in use, you can change it (for example if you have PMA)
HOST_MACHINE_PMA_PORT=8082
HOST_MACHINE_PMA_SECURE_PORT=8443

# If you already has the port 6379 in use, you can change it (for example if you have Redis)
HOST_MACHINE_REDIS_PORT=6379

# MySQL root user password
MYSQL_ROOT_PASSWORD=tiger

# Database settings: Username, password and database name
#
# If you need to give the docker user access to more databases than the "docker" db
# you can grant the privileges with phpmyadmin to the user.
MYSQL_USER=docker
MYSQL_PASSWORD=docker
MYSQL_DATABASE=docker
artemsites commented 8 months ago

docker exec -it CONTAINER_HASH_NAME bash cd /var/www/html chown -R www-data:www-data ./

mesterbence commented 7 months ago

docker exec -it CONTAINER_HASH_NAME bash cd /var/www/html chown -R www-data:www-data ./

Thank you very much, it worked for me!

fzlaziz commented 3 weeks ago

docker exec -it CONTAINER_HASH_NAME bash cd /var/www/html chown -R www-data:www-data ./

is there another solution? if i do that i cant edit the files in www/ with another user, because the files become read only that i cant access. I just code a simple php application with upload feature, but i got Failed to open stream : permission denied, so i cant move uploaded files