kaApache2 Debian Forbidden You don't have permission to access /test.html on this server.

启动kali下apache,访问/var/www/html下的txt文档可以正常打开,但是访问图片后缀就提示Apache2 Debian Forbidden  You don't have permission to access /test.html on this server.,通过查资料做了如下操作解决次问题:

修改apache2.conf文件如下,添加了Order allow,deny    Allow from all:

kaApache2 Debian Forbidden You don't have permission to access /test.html on this server.

做完上述修改还是不行,最后运行如下两条命令搞定

 chmod -R g+rw /var/www
chown -R www-data:www-data /var/www