0

I've read all the relevant topics and went trough the anwers, but my program is still not workint properly.

I get the following error message:

Warning: mkdir(): Permission denied in /var/www/printing/uploader_temp.php on line 28

Where line 28 looks like this:

mkdir("upload", 0777, true);

The current user who is logged in is called "server". The owner of both var/www/ and var/www/printing is "server". (without " of course) The attribute of var/www/ptinting is -777.

I modified the following rows in /etc/apache2/envvars to look like this:

export APACHE_RUN_USER=server
export APACHE_RUN_GROUP=server

and restarted apache server.

I can create folders manually on server or using FTP.

Does anyone have an idea what I did wrong? Where else should I set permissions?

The OS is Ubuntu.

Thank you for your answers.

2 Answers2

0

Did you tried to give permissions to apache user? I had this problem on my web application and I solved it in two commands:

  1. chown -R www-data:www-data /path/to/webserver/www
  2. chmod -R g+rw /path/to/webserver/www

Hope this helps for you too.

Angel
  • 357
  • 3
  • 6
  • 17
0

Try to have a look to AppArmor:

https://wiki.ubuntu.com/AppArmor

Try to create a file or a directory in the /tmp/, can you?

rvandoni
  • 3,297
  • 4
  • 32
  • 46