Simple question and there is perhaps a simple answer.
I have several directories in my home folder that I would like to make available as a directory on my webserver. So, what I did was to create a symlink:
iMac:/Library/WebServer/Documents/ ls -ltr
-rw-rw-r-- 1 root admin 44 Nov 20 2004 index.html.en
-rw-rw-r-- 1 root admin 31958 May 18 2009 PoweredByMacOSXLarge.gif
-rw-rw-r-- 1 root admin 3726 May 18 2009 PoweredByMacOSX.gif
-rwxr-xr-x 1 mego admin 0 Jan 6 2011 favicon.ico
lrwxrwxr-x 1 mego admin 52 Jul 26 13:45 myadmin -> /Users/mego/Downloads/phpMyAdmin-3.4.3.2-english
iMac:/Library/WebServer/Documents/ ln -s /Users/mego/opt/rel/src/main/web/ rel
iMac:/Library/WebServer/Documents/ ls -ltr
-rw-rw-r-- 1 root admin 44 Nov 20 2004 index.html.en
-rw-rw-r-- 1 root admin 31958 May 18 2009 PoweredByMacOSXLarge.gif
-rw-rw-r-- 1 root admin 3726 May 18 2009 PoweredByMacOSX.gif
-rwxr-xr-x 1 mego admin 0 Jan 6 2011 favicon.ico
lrwxrwxr-x 1 mego admin 52 Jul 26 13:45 myadmin -> /Users/mego/Downloads/phpMyAdmin-3.4.3.2-english
lrwxrwx--- 1 mego admin 47 Oct 12 09:58 rel -> /Users/mego/opt/rel/src/main/web/
Permissions on /Users/mego/opt/rel are recursively set to a+rx so everybody can read and execute.
When I try to change the permission, i.e. "chmod a+rx rel" and "chmod -R a+rx /Users/mego/opt/rel", zero effect.
The output of
ls -ld / /Users /Users/mego /Users/mego/opt /Users/mego/opt/rel /Users/mego/opt/rel/src /Users/mego/opt/rel/src/main /Users/mego/opt/rel/src/main/web
iMac:~/ ls -ld / /Users /Users/mego /Users/mego/opt /Users/mego/opt/rel /Users/mego/opt/rel/src /Users/mego/opt/rel/src/main /Users/mego/opt/rel/src/main/web
drwxrwxr-t@ 39 root admin 1394 Sep 14 15:30 /
drwxr-xr-x 7 root admin 238 Aug 29 10:04 /Users
drwxr-xr-x+ 98 mego staff 3332 Oct 15 10:59 /Users/mego
drwxrwxr-x 19 mego staff 646 Oct 14 20:47 /Users/mego/opt/rel
drwxrwxr-x 5 mego staff 170 May 31 08:01 /Users/mego/opt/rel/src
drwxrwxr-x 6 mego staff 204 Oct 12 08:42 /Users/mego/opt/rel/src/main
drwxrwxr-x 5 mego staff 170 Oct 12 08:42 /Users/mego/opt/rel/src/main/web
iMac:~/
Must be something related to users home folder. But strangely enough, another folder "myadmin" has correct permissions and it works. What am I doing wrong?
Thank you in advance.
ls -ld / /Users /Users/mego /Users/mego/opt /Users/mego/opt/rel /Users/mego/opt/rel/src /Users/mego/opt/rel/src/main /Users/mego/opt/rel/src/main/web
– Gilles 'SO- stop being evil' Oct 12 '11 at 23:39