Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 have created a directory in my www folder using terminal and root user. Then, create some text files in that folder (with terminal and root user).

Now, when I want to access these files and directory via browser, Apache said:

403 Forbidden. You don't have permission to access /folder on this server.

Other files and folders in www directory are accessible via browser (I uploaded them via FTP client).

How can this be fixed?

share|improve this question

run this command in the terminal after navigating to www folder:

    sudo chmod 755 *     
share|improve this answer

The webserver must have privilieges to read the files and directories in this webserver-root-directory. Make sure the permissions are 644 (or higer if required) and owned by www-data:www-data or your FTP-User if this work for your setup.

Try to delete your browser-cache if the error is still shown.

share|improve this answer
folder is set to 755, and files are 644. I tried this command: chown www-data:www-data folder, but it said: invalid user: www-data – jiun Feb 21 '13 at 8:49
Did you installed apache from apt? It should create a user and a group called "www-data". What does id www-data say? Take a look in "/etc/apache2/envvars" What is set for export APACHE_RUN_USER and export APACHE_RUN_GROUP? Try to chown your files to this user and group. – prophecy201 Feb 21 '13 at 14:33

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.