4

Server: Ubuntu 12.04 w/ LAMP I can access the default index.html, but I created a symbolic link to a folder in my Dropbox. Whenever I try to access 192.168.2.6/Joomla (Joomla is the symbolic link), I get a 403 error. Editing my httpd.conf according to this question didn't work. I can post conf files, etc, just ask.

I've tried using chmod to allow all permissions on the files in question, but that didn't help.

Also, I deleted the default index.html to force Apache to show the www directory. It shows, but is empty (Symbolic link doesn't show up)

Output from ls -lSrah (in Joomla):

total 7.6M
-rwxrwxr-x  1 somekittens somekittens  865 Mar 31 18:03 robots.txt
-rwxrwxr-x  1 somekittens somekittens 1.3K Mar 31 18:03 index.php
-rwxrwxr-x  1 somekittens somekittens 1.7K Mar 31 18:03 web.config.txt
-rwxrwxr-x  1 somekittens somekittens 1.8K Mar 31 18:07 joomla.xml
-rwxrwxr-x  1 somekittens somekittens 3.1K Mar 31 18:03 htaccess.txt
drwxrwxr-x  2 somekittens somekittens 4.0K Mar 31 18:03 tmp
drwxrwxr-x  6 somekittens somekittens 4.0K Mar 31 18:03 templates
drwxrwxr-x 13 somekittens somekittens 4.0K Mar 31 18:03 plugins
drwxrwxr-x 26 somekittens somekittens 4.0K Mar 31 18:03 modules
drwxrwxr-x 15 somekittens somekittens 4.0K Mar 31 18:03 media
drwxrwxr-x  2 somekittens somekittens 4.0K Mar 31 18:03 logs
drwxrwxr-x  7 somekittens somekittens 4.0K Mar 31 18:03 libraries
drwxrwxr-x  4 somekittens somekittens 4.0K Mar 31 18:03 language
drwxrwxr-x 10 somekittens somekittens 4.0K Mar 31 18:03 installation
drwxrwxr-x  2 somekittens somekittens 4.0K Mar 31 18:03 includes
drwxrwxr-x  4 somekittens somekittens 4.0K Mar 31 18:03 images
drwxrwxr-x 13 somekittens somekittens 4.0K Mar 31 18:03 components
drwxrwxr-x  2 somekittens somekittens 4.0K Mar 31 18:03 cli
drwxrwxr-x  2 somekittens somekittens 4.0K Mar 31 18:03 cache
drwxrwxr-x 10 somekittens somekittens 4.0K Mar 31 18:03 administrator
drwxrwxr-x  5 somekittens somekittens 4.0K May 25 08:51 ..
drwxrwxr-x 17 somekittens somekittens 4.0K May 25 08:53 .
-rwxrwxr-x  1 somekittens somekittens 4.2K Mar 31 18:03 README.txt
-rwxrwxr-x  1 somekittens somekittens  18K Mar 31 18:03 LICENSE.txt
-rwxrwxr-x  1 somekittens somekittens 7.5M Mar 31 18:18 Joomla_2.5.4-Stable-Full_Package.zip

Output from ls -lSrah (in /var/www/):

somekittens@KittensTest:/var/www$ ls -lSrah
total 7.5M
lrwxrwxrwx  1 root root   41 May 25 09:39 Joomla -> /home/somekittens/Dropbox/Project/Joomla/
drwxr-xr-x 13 root root 4.0K May 24 20:50 ..
drwxr-xr-x  2 root root 4.0K May 25 10:08 .

/etc/apache2/httpd.conf

<virtualHost indextj:80>
ServerAdmin webmaster@indextj

DocumentRoot /home/somekittens/Dropbox/Project/Joomla
<Directory />
        Options +FollowSymLinks -SymLinksIfOwnerMatch
        AllowOverride All
</Directory>

2
  • can you go to to the Joomla folder and give me the output from ls -lSrah also , go to /var and do the same, i want to see the file permissions and owner for /var/www, also the log files can be helpful, if you are using apache2 you can find them at /var/log/apache2/error.log by default, reproduce the error and use grep to pipe the error.log output to get the recent errors.
    – murgi
    May 25, 2012 at 14:07
  • Done! The logs give me Symbolic link not allowed or link target not accessible: /var/www/Joomla May 25, 2012 at 14:18

1 Answer 1

14

Your server is set to not follow symlinks. Add this line:

Options +FollowSymLinks -SymLinksIfOwnerMatch

to your http.conf. For more info: http://www.hackersgarage.com/symbolic-link-not-allowed-or-link-target-not-accessible.html

You will also need to add browse access for others to each folder, all the way up to /home/somekittens/Dropbox/Project/Joomla/. i.e.

sudo chmod o+x /home
sudo chmod o+x /home/somekittens
chmod o+x /home/somekittens/Dropbox
chmod o+x /home/somekittens/Dropbox/Project
chmod o+x /home/somekittens/Dropbox/Project/Joomla
10
  • I don't have the /etc/httpd directory. I edited it in /etc/apache2, but that didn't change anything. May 25, 2012 at 14:46
  • Did you restart Apache? I forgot to mention, you have to do that too.
    – reverendj1
    May 25, 2012 at 15:00
  • Rebooted, no dice. May 25, 2012 at 15:10
  • Where in the config did you put it? Try putting just Options FollowSymLinks in your Directory stanza. Also, if you are symlinking the directory root, why not just point it at the right place, instead of symlinking?
    – reverendj1
    May 25, 2012 at 15:31
  • 1
    This part: DocumentRoot /var/www. Why not just use DocumentRoot /home/somekittens/Dropbox/Project/Joomla/ instead of symlinking to it? Also, I believe the second Directory stanza is incorrect. That would point http://mysite/var/www to /var/www on the local file system.
    – reverendj1
    May 25, 2012 at 15:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .