Open v1net opened 9 months ago
{"ok":false,"error":"internal_server_error","status":500,"message":"EACCES: permission denied, mkdir '/var/lib/outline/data/uploads'"}
root@getoutline2:/home/user/outline-docker-compose/data# ls -la total 20 drwxr-xr-x 5 root root 4096 Okt 6 17:00 . drwxr-xr-x 6 root root 4096 Okt 6 17:00 .. drwxrwxrwx 3 root root 4096 Okt 6 17:04 outline drwx------ 19 70 root 4096 Okt 6 17:00 pgdata drwxr-xr-x 4 root root 4096 Okt 6 17:00 uc root@getoutline2:/home/user/outline-docker-compose/data# cd outline/ root@getoutline2:/home/user/outline-docker-compose/data/outline# ls -la total 12 drwxrwxrwx 3 root root 4096 Okt 6 17:04 . drwxr-xr-x 5 root root 4096 Okt 6 17:00 .. drwxr-xr-x 3 1001 65533 4096 Okt 6 17:04 uploads root@getoutline2:/home/user/outline-docker-compose/data/outline# ls -la total 12 drwxrwxrwx 3 root root 4096 Okt 6 17:04 . drwxr-xr-x 5 root root 4096 Okt 6 17:00 .. drwxr-xr-x 4 1001 65533 4096 Okt 6 17:09 uploads root@getoutline2:/home/user/outline-docker-compose/data/outline# cd uploads/ root@getoutline2:/home/user/outline-docker-compose/data/outline/uploads# ls -la total 16 drwxr-xr-x 4 1001 65533 4096 Okt 6 17:09 . drwxrwxrwx 3 root root 4096 Okt 6 17:04 .. drwxr-xr-x 4 1001 65533 4096 Okt 6 17:05 68d9332f-81a7-455f-993e-1d2947760ddc drwxr-xr-x 3 1001 65533 4096 Okt 6 17:09 753e1c5b-39dc-4195-a455-ccde7ed692e0 root@getoutline2:/home/user/outline-docker-compose/data/outline/uploads#
the folder rights for the uploads are not right
with 2 different users i created uploaded images, so iam be sure that the user id 1001 is the only one who is accessing the folder uploads
after i changed the rights
sudo chown 1001:65533 /home/user/outline-docker-compose/data/outline/uploads sudo chmod 700 /home/user/outline-docker-compose/data/outline/uploads
I faced same issue and solved it by changing docker-compose.yml.
wk-outline:
image: outlinewiki/outline:${OUTLINE_VERSION}
command: sh -c "yarn db:migrate --env production-ssl-disabled && yarn start"
environment:
- DATABASE_URL=postgres://user:pass@wk-postgres:5432/outline
- DATABASE_URL_TEST=postgres://user:pass@wk-postgres:5432/outline-test
- REDIS_URL=redis://wk-redis:6379
- AWS_S3_UPLOAD_BUCKET_NAME=outline-bucket
env_file:
- ./env.outline
- ./env.oidc
volumes:
- ./data/outline:/var/lib/outline/data
user: 0:0 // add this line
restart: always
depends_on:
- wk-postgres
- wk-redis
##BEGIN MINIO
- wk-minio
##END
add user: 0:0
in wk-outline.
I faced same issue and solved it by changing docker-compose.yml.
wk-outline: image: outlinewiki/outline:${OUTLINE_VERSION} command: sh -c "yarn db:migrate --env production-ssl-disabled && yarn start" environment: - DATABASE_URL=postgres://user:pass@wk-postgres:5432/outline - DATABASE_URL_TEST=postgres://user:pass@wk-postgres:5432/outline-test - REDIS_URL=redis://wk-redis:6379 - AWS_S3_UPLOAD_BUCKET_NAME=outline-bucket env_file: - ./env.outline - ./env.oidc volumes: - ./data/outline:/var/lib/outline/data user: 0:0 // add this line restart: always depends_on: - wk-postgres - wk-redis ##BEGIN MINIO - wk-minio ##END
add
user: 0:0
in wk-outline.
This fixed my issue, you're goated for this
@7ekhed lol glad to help you it might caused due to the file access privilege in wk-outline container, and that command makes the outline container runs as a root user. Therefore, if you use that solution, the outline container runs as a root user, and the execute command also. Maybe you already know it. thx.
hi, great work!!! many thanks for that
its working fine but i cant get images uploaded to some posts i creat in my outline installation. Is there some settings i hade to made on top?