Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am pretty new to linux and trying to setup cakephp on opensuse 12.1. I did as told on the cakephp website(blog tutorial) and most probably encountering some permission issues. I slapped the cakephp folder in /srv/www/htdocs and then tried to access it using localhost/cakephp where it says

Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403

But as i check for permissions I get

Suse:/srv # ls -lR shows sankalp as owner for all the files down the tree.

sankalp@Suse:/srv/www/htdocs> whoami
sankalp@Suse:/srv/www/htdocs> ls -l
total 108
drwxrwxrwx  6 sankalp users  4096 Jun 27 12:44 cakephp
-rw-r--r--  1 sankalp users 73728 Jul  6 10:41 das
-rwxrwxrwx  1 sankalp  root    302 Mar 13  2006 favicon.ico
-rwxrwxrwx  1 sankalp  root     26 Jun 28 19:04 whoami.php

Neither can I access whoami.php while favicon.ico gets displayed in the browser.What am I doing wrong here when I have given 777 to the user.

share|improve this question
What webserver are you using and who is it running as? – Alex Chamberlain Jul 6 '12 at 7:46
I am using apache and as for 'who you are running it as?' isn't it the same as the user account am currently logged on as.(output of whoami)? – Sankalp Jul 6 '12 at 8:37
Depends how you started it - but generally it runs as www-data. – Alex Chamberlain Jul 6 '12 at 8:39
Please read For security reasons why should /var/www not have chmod 777 and Why is it so important to remove 777 permissions? I don't know if setting the permissions to 777 caused the problem (do try setting them to a reasonable value, i.e. 755 for executables and directories and 644 for other files), but it is a bad idea even anyway. – Gilles Jul 6 '12 at 22:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.