Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using Ubuntu 12.04 and have configured apache to serve from ~/public_html. I am trying to serve some directory contents over http on LAN.

When I did the following:

ln -s ../Videos/android-internals-marakana/ android-internals-marakana  

I was able to see the specified directory at localhost (in browser) with my public_html directory contents as follows:

k4rtik: public_html $ ls -l
total 12
lrwxrwxrwx 1 k4rtik k4rtik   37 May 27 15:59 android-internals-marakana -> ../Videos/android-internals-marakana/
drwxrwxr-x 2 k4rtik k4rtik 4096 May 19 13:05 cgi-bin
-rw-rw-r-- 1 k4rtik k4rtik 1406 May 19 12:20 favicon.ico
-rw-r--r-- 1 k4rtik k4rtik  178 May 19 10:21 nindex.html

But when I similarly try creating a link to android documentation with

ln -s ../bin/android-sdk-linux/docs/ droid-docs

I get the symbolic link in directory listing but not at localhost in browser.

I have checked everything I could on my own - directory permissions, validity of the link, typing the dir name in the url directly (received Forbidden - You don't have permission to access /droid-docs on this server. there).

Any clue on what's going on and how to get this to work? Is it because bin folder is somewhat special as compared to other folders in my home directory?

share|improve this question
    
What are the permissions of ~/bin/, ~/bin/android-sdk-linux and ~/bin/android-sdk-linux/docs/ –  Ulrich Dangel Jun 2 '12 at 12:28
    
Damn, didn't think about that. There was just one problem with android-sdk-linux directory - rwxrwx---. Thanks a lot. –  k4rtik Jun 2 '12 at 16:16
    
Please post the answer as an answer... –  jasonwryan Jun 2 '12 at 22:03
    
Share your apache config please , at least <Directory XX> part –  warl0ck Jun 3 '12 at 2:55
    
No drastic change from Ubuntu's default config. I have just set the directory root to ~/public_html as mentioned in the question. If you are really interested in that have a look at k4rtik.wordpress.com/2011/08/19/… which I wrote sometime back. –  k4rtik Jun 3 '12 at 3:04

1 Answer 1

up vote 1 down vote accepted

As Ulrich Dangel points out in his comment above - the whole directory hierarchy leading to the required directory should be accessible to apache in order for it to serve the directory and its listing.

I had to chmod ~/bin/android-sdk-linux to 775 which was originally set to 770.

share|improve this answer

Your Answer

 
discard

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.