dsavell / docker-grav

Docker Container for GRAV CMS
MIT License
40 stars 18 forks source link

Unable to upload images #30

Closed malopez00 closed 3 years ago

malopez00 commented 3 years ago

I have created the containe following your instructions. Everything seems to be working except for uploading files. For example, when trying to change the avatar the following error arises:

Unable to upload file photo.jpg: Missing a temporary folder

My docker_compose.yml file is:

version: '3'
services:
  grav:
    restart: always
    image: dsavell/grav:admin
    container_name: grav-website
    ports:
      - 6501:80
    environment:
      - DUID=1026
      - DGID=65126
    volumes:
      - /volume/docker/grav/backup:/var/www/grav/backup
      - /volume/docker/grav/logs:/var/www/grav/logs
      - /volume/docker/grav/user:/var/www/grav/user
      - /volume/docker/grav/tmp:/var/www/grav/tmp
dsavell commented 3 years ago

Hey thanks for reporting, I will do some investigation on this.

malopez00 commented 3 years ago

If it is of any help, it also fails when trying to update the admin package:

Unable to create temporary file, Check permissions in temporary files directory.

I think it may have something to do with the php user and permissions

malopez00 commented 3 years ago

I kind of solved it. Entered the container command line and executed: chmod 777 /tmp

Now everything works like a charm

The problem is I need to do this everytime I restart the container, any ideas?

dsavell commented 3 years ago

Fix incoming on #32 PR,

Bassically php has not been configured to upload to a tmp directory owned by GRAV itself, upload_tmp_dir=/var/www/grav/tmp will now be set once PR and new image has been uploaded.