1

i use Linux and i did the following procedures to move htdocs files in Dropbox :

  1. mkdir ~/Dropbox/www/
  2. ln -s ~/Dropbox/www/ /opt/lampp/htdocs/

and when i try to access this folder i get

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

localhost Fri May 13 17:32:37 2011 Apache/2.2.17 (Unix) DAV/2 mod_ssl/2.2.17 OpenSSL/1.0.0c PHP/5.3.5 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1

Thanks

2 Answers 2

2

What are the permissions in the folder ? Does lampp user and group can acess the folder?

Check the permissions in the folder

Beside, apache is configured not to access folders outside the documentroot (tipical /var/www/html or something like it)

You need to edit httpd.conf (or whatever is the configuration file for lampp) and add a few lines:

<Directory "/home/<user>/Dropbox/www"> Options -Indexes FollowSymlinks AllowOverride None Order allow,deny Allow from all </Directory> 

Save and restart lampp.

This should work.

Cheers

5
  • well, when i link an external folder to the "htdocs" folder other than the Dropbox folder, it runs successfully. Those are the permission of /opt/lampp/htdocs/www/ folder lrwxrwxrwx 1 root root 25 May 13 17:32 /opt/lampp/htdocs/www -> /home/rafael/Dropbox/www/ I'll try the Directory thing and come back with the result. Thanks. Commented May 13, 2011 at 17:42
  • I tried adding "/home/rafael/Dropbox/www" to the directory and directory root, same result :( Commented May 13, 2011 at 17:52
  • Check the permissions of the dropbox folder... the lampp stack is running as some user (check the configuration files to see that) and the dropbox folder must allow that user to see the contents. Since it is in your home folder is a bit tricky - just to verify try this: chmod 666 -R Dropbox and see if it works. Commented May 13, 2011 at 17:58
  • 1
    I just got it working, i've change the "User nobody" in my httpd.conf file to "User rafael". But does this affect the security in anyway ? Commented May 13, 2011 at 18:41
  • Hi ! It does affect the security in order that, if someone hacks your apache server, it will get the permissions of the user that's running the apache server, in this case, yours. Check this page for more information about Linux users and groups - link Commented May 16, 2011 at 17:23
2

You need to give execute permissions to the user under which your web server is running to all directories in the path /home/Dropbox/www and /opt/lampp/htodcs/. You also need to give that user read permission in the last directory of both paths.

1
  • same problem as OP, but even I set to 777, still 403 Access Forbidden Commented May 6, 2013 at 8:36

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.