0
Drupal 8.2.6
Media Entity 8.x-1.0-alpha4
Ctools 8.x-3.0-alpha27

So after turn on CSS/JS aggregation I noticed that I can not upload images anymore. When I try to upload an image it gave me an error. So I changed my tmp directory to

sites/default/files/tmp

but that didn't help and gave me an error of

The file could not be saved. An unknown error has occurred.
File upload error. Could not move uploaded file.
This value should not be null.

I checked the permissions. default folder is 755. files folder is 755. tmp folder is 755. This also started affecting my Drupal 7 website after I enabled aggregation, so I am certain this is what is affecting my site.

Any information or leads would be very helpful, as I've been stuck.

Armando Silva
  • 27
  • 1
  • 1
  • 6
  • did you check user who is owner ? www-data must be owner , he need to create some directories pour generate css aggregated files – Fky Mar 10 '17 at 14:34
  • Which folder do I check for ownership? All of the files are owned by the same owner. I did check error message and get this message: Upload error. Could not move uploaded file x.png to destination private://2017-03/x.png. – Armando Silva Mar 10 '17 at 15:12
  • private:// <= files_private , www-data must be owner of tmp , files and files_private . – Fky Mar 10 '17 at 15:53

1 Answers1

0

After a long 2 days struggling to find the answer, I finally found a temporary solution. I used the command chmod -R 1777 /tmp . Then in admin/config/media/file-system I set directory to /tmp . Might have security vulnerabilities, but it works for me.

Armando Silva
  • 27
  • 1
  • 1
  • 6