0

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)

mrdaliri
  • 7,148
  • 22
  • 73
  • 107
  • Have you tried www.example.com or www.example.com/mytextfile.txt? What are the permission currently set? Is there a .htaccess file in place? – tim.baker Feb 21 '13 at 09:56

1 Answers1

0

You have to change the files and folder owner. Form you terminal:

chown YOUR_APACHE_USER YOUR_FOLDER

(Obviously you will have to replace YOUR_APACHE_USER and YOUR_FOLDER)

alternatively you can write:

chown -R YOURAPACHEUSER YOUR_FOLDER

to do all files and sub folders.

Note: you must write the absolute path of YOUR_FOLDER

ilpaolino
  • 11
  • 2