We had a disk problem on our Ubuntu server on May 8. After that, we have not been able to upload pictures with our app. I am quite sure my problem is connected to user and folder rights.
This has resulted in that the images we try to upload are stuck in the tmp directory, and are not moved to the img directory and registered in the database.
I have changed the rights to 777 on the tmp and img directory and restarted the apache server, without success.
The rights, owner, group for the file and tmp directorise in the _lib directory:
drwxrwxr-x 19 www-data www-data 4096 May 8 23:33 ./
drwxrwxr-x 43 www-data www-data 4096 May 8 23:34 …/
drwxrwxr-x 4 www-data www-data 4096 May 8 23:33 file/
drwxrwxrwx 2 www-data www-data 4096 May 26 14:27 tmp/
The rights owner group for picture files uploaded to the tmp directory:
drwxrwxrwx 2 www-data www-data 4096 May 26 14:27 ./
drwxrwxr-x 19 www-data www-data 4096 May 8 23:33 …/
-rwxrwxr-x 1 www-data www-data 13 Jul 24 2020 index.html*
-rw-r–r-- 1 www-data www-data 2495702 May 26 14:21 sc_4a35df31_4fd001a41624503fb256ef6e36779893.jpg
The rights owner group for img folder:
drwxrwxr-x 4 www-data www-data 4096 May 8 23:33 ./
drwxrwxr-x 19 www-data www-data 4096 May 8 23:33 …/
drwxrwxr-x 2 www-data www-data 4096 May 8 23:33 doc/
drwxrwxrwx 2 www-data www-data 143360 May 23 20:05 img/
-rwxrwxr-x 1 www-data www-data 13 Jul 24 2020 index.html
The rights owner group for the old images in the img folder:
drwxrwxrwx 2 www-data www-data 143360 May 23 20:05 ./
drwxrwxr-x 4 www-data www-data 4096 May 8 23:33 …/
-rwxrwxr-x 1 www-data www-data 107658 Aug 8 2021 0114A49C-D10D-437F-AFE3-1DD2EAB43674.jpeg*
-rwxrwxr-x 1 www-data www-data 339269 Jan 20 2021 01346B1B-F11F-4420-9763-AD9171FFB60D.jpeg*
Would be appreciated if one of you could be so kind and guide me on the right path?
Thank you