I can't understand where the problem is. Apache is running with my standard user that actually can write those files.
What should I do?
I can't understand where the problem is. Apache is running with my standard user that actually can write those files.
What should I do?
One possibility is that you have SELinux enabled and the files/directories that can't be written were originally created in your home directory (e.g. you unzipped them there, then moved then to /var/www/html). SELinux doesn't allow apache to modify those files even though they seem to have correct file permissions. Try disabling SELinux. If that resolves the problem, you can either run with SELinux permanently disabled, or you can work through the SELinux settings to get those files and directories writable by apache.
Check SElinux is enabled or not using the following command from su in console.
selinuxenabled && echo enabled || echo disabled
if it returns "enabled" then disable it using following command
echo 0 > /selinux/enforce
now check that apache can write to the user directory.
I don't like the idea of disabling SELinux.. rather enable SELinux so Apache/PHP can write to where you neeed it to.
You can simply change the SE context of the directory to allow httpd to upload file:
chcon -t tmp_t www/
I had to do the same thing to get Wordpress Media uploads to work on my upload/
folder. See my SU post @ Wordpress can't upload images due to permissions
Hope this helps!