许可403错误

我昨天从opensuse切换,我试图configuration个人电脑。 在opensuse很容易,因为我只需要使用yast。

现在:我有403错误

Forbidden You dont have permission to access / on this server. Apache/2.2.14 (Ubuntu) Server at ros Port 80 

在/ etc / apache2的/网站可用/ ROS

 <VirtualHost 127.0.0.2:80> ServerAdmin admin@ros ServerName ros ServerAlias ros DocumentRoot /home/daniel/Public/ros <Directory /home/daniel/Public/ros/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> </VirtualHost> 

/ etc / hosts文件

 127.0.0.2 ros www.ros 

也在/var/log/apache2/error.log中

 [Thu Jun 24 11:32:20 2010] [crit] [client 127.0.0.2] (13)Permission denied: /home/daniel/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable 

我用下面的命令把/ home / daniel / Public / ros文件夹剪下来

 chown -R daniel:www-data /home/daniel/Public/ros 

在chown中也尝试了www-data:www-data 。 但我不明白为什么它说权限被拒绝/home/daniel/.htaccess/
谢谢 !

你的主目录可能是700.Apache只需要+ x进入目录,所以我们可以做到这一点

 chmod +x /home/daniel 

只要/家/丹尼尔/公共/罗斯是755你应该是好去。