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

weeheavy
  • 4,089
  • 1
  • 28
  • 41
Rafael
  • 113
  • 1
  • 4

2 Answers2

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.

Paweł Brodacki
  • 6,511
  • 20
  • 23
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

Raptor
  • 1,001
  • 4
  • 19
  • 38
Feiticeir0
  • 434
  • 3
  • 11
  • 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. – Rafael May 13 '11 at 17:42
  • I tried adding "/home/rafael/Dropbox/www" to the directory and directory root, same result :( – Rafael May 13 '11 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. – Feiticeir0 May 13 '11 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 ? – Rafael May 13 '11 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](http://www.howtogeek.com/howto/36845/the-beginners-guide-to-managing-users-and-groups-in-linux/) – Feiticeir0 May 16 '11 at 17:23