Ubuntu/Apache2/ Forbidden/Permission error

前端 未结 3 1154
独厮守ぢ
独厮守ぢ 2021-01-20 15:07

I have Ubuntu 11.10 with Lamp installed

There is some files that i can\'t access to from my web directory \"/var/www\"

http://localhost/banner/banner.html I

3条回答
  •  死守一世寂寞
    2021-01-20 15:21

    the user running the apache deamon, on ubuntu thats www-data (like in most debian based systems), needs at least read permissions for the files. But as you posted only owner root and group root has read rights.

    Actually owner root has rw group root has r.

    So the user actually running the webserver (www-data) falls to the others permissions, which have none.

    Either do a chmod -R o+r /var/www/banner/* or a chown -R www-data /var/www/banner to fix that.

提交回复
热议问题