After few days, since I asked this question: LINK I realized, that maybe it's another problem.

I used package inotifywait to check, is a temporary file generating after sending html form. Unfortunately temp file is not creating, after clicking "upload" button in my form, but I don't know why, because even I had turned off firewall (I thought that it is a problem - I was wrong). Maybe someone has this same problem?

OS is newly installed, so I didn't change so much in httpd.conf and php.ini.

Below is a list 'What I checked?':

  1. enctype='multipart/form-data' is set,
  2. /tmp/ is a upload_tmp_dir,
  3. file_uploads is on,
  4. File size is in limit, which is set into upload_max_filesize (limit is 2MB, but file have 18KB),
  5. I tried to use aboslute path,
  6. /tmp/ and /var/www/html/upload have chmod set on 777 and upload owner and owner group is apache,
  7. I tried change upload_tmp_dir in php.ini, but it bring this same result.

It seems SElinux is preventing to write the file. Please check SElinux configuration. If it is already disabled, please share httpd error log.

  • I'm not absolving SELinux, but I'm just curious what evidence you see that it's involved? – Jeff Schaller Jun 12 '17 at 14:02

Unfortunately, I didn't know, that inotifywait can't show files of other owners, even in /tmp/, so temporary files were uploaded into /tmp/, but I wasn't be able to saw it.

Problem was only with SELinux, what I posted in my linked topic a moment ago.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.