Forum OpenACS Q&A: Group permissions for Aolserver (re: libpq.so.2 not found)

In trying to install an already existing OACS 4.5 setup on a new RedHat 8.0 server with Aolserver 3.5.1 and postgresql 7.2.3 (and not wanting to use RPMS). Everything would run fine if it run by nsadmin, but if run as root (to use port 80), I would get:

[07/Feb/2003:17:08:13][1126.8192][-main-] Warning: modload: failed to load '/usr/local/aolserver/bin/postgres.so': 'libpq.so.2: cannot open shared object file: No such file or directory'

This has been discussed before (here, here, here, and here) but none of these threads really provided an answer (This could be read as an answer but isn't really specific enough).

As mentioned elsewhere, I created a link from libpq.so.2 to libpq.so.2.2 and the permissions looked right:

lrwxrwxrwx    1 postgres web            12 Feb  4 18:42 libpq.so -> libpq.so.2.2
lrwxrwxrwx    1 postgres web            12 Feb  4 18:42 libpq.so.2 -> libpq.so.2.2
lrwxrwxrwx    1 postgres web            12 Feb  6 19:25 libpq.so.2.0 -> libpq.so.2.2
-rwxr-xr-x    1 postgres web         71326 Feb  4 18:42 libpq.so.2.2

But the problem turned out to be permissions on /usr/local/pgsql, which were 750 and needed to be 755:

]# ls -la /usr/local/pgsql
drwxr-x---    8 postgres web          4096 Feb  4 18:46 .
drwxr-xr-x   15 root     root         4096 Feb  4 18:27 ..
drwxr-xr-x    2 postgres web          4096 Feb  4 18:42 bin
drwxr-xr-x    4 postgres web          4096 Feb  4 18:46 doc
drwxr-xr-x    4 postgres web          4096 Feb  4 18:42 include
drwxr-xr-x    2 postgres web          4096 Feb  6 19:25 lib

chmod a+rx /usr/local/pgsql fixed the problem, but raises the question: if you're running aolserver with -g web, why can't it read /usr/local/pgsql with the default, group-readable permissions?

Let's go to the obvious possibility first.  Is nsadmin a member of group web?

There are known problems with -g support.  You should be able to just allow world read and execute on /usr/local/pgsql/lib.

This is one case a from RPM installation is much easier, since libpq is in /usr/lib....but I'm biased, being the PostgreSQL RPM maintainer....

Yes, nsadmin is a member of the group web.

So I did more digging and found this bug with a patch provided, and this other patch. This is a rather surprising bug to go unfixed. Does anyone have experience with either of these patches?

chmod a+rx /usr/local/pgsql

wow thanks. That was driving me crazy. I found all those other threads. This should be in the docs somewhere, ie, when upgrading from postgres 7.2 to 7.3 or higher, if you're pulling your hair out, try chmod 755 /usr/local/pgsql

e