Forum OpenACS Q&A: OpenACS 4.6.3/5.0.0b4 on Debian - Permissions Problem

Before I begin, I'd like to note that I've had success installing OpenACS 4.5 on RedHat 7.3 and 8.0 before. Seeking to move to something a little leaner, I decided to work with Debian.

I've followed the directions for the most part to install both OpenACS 4.6.3 and 5.0.0b4. I opted to use the apt-get version of PostgreSQL, which worked fine. Instead of the group 'web', user 'postgres' was created with group 'postgres.' I used a 'usermod' statement to add user 'postgres' to group 'web'.

I then successfully compiled AOLServer and installed tDOM. After configuring a user account 'dev_divvy' and adding it to group 'web', I have run across some permission problems when I try to launch the OpenACS installer from a 'nsd-postgres' instance from username 'dev_divvy'.

When I do a 'tail /var/log/syslog', it gives me this:

[28/Dec/2003:15:33:40][25519.3076][-conn0-] Error: Error sourcing /var/lib/aolserver/dev_divvy/packages/acs-bootstrap-installer/installer/install.tcl:
couldn't create error file for command: permission denied
    while executing
"open "|[file join [db_get_pgbin] psql] $pghost $pgport $pguser -f $file_name [db_get_database] $pgpass" "r""
    ("postgresql" arm line 37)
    invoked from within

I am guessing this has something to do with permissions with regards to my various users. I can't determine a good way of figuring out what is going on.

Can somebody either tell me what I'm doing wrong or an effective way to troubleshoot this?

Personally, I am beginning to think that instead of attempting a local install, I should have shopped around for a development account. I think that one of the biggest drawbacks to OpenACS has been the install process. While everybody has talked about a "just add water" installation, maybe the more appropriate solution should be a "just pay someone" installation. It could be cost-effective for both a provider and a person/organization in my organization that wants to take off the sysadmin hat and just wear the developer hat. Colocation/dedicated servers are available rather inexpensively on (*drumroll*) an outsourced basis.

Just thoughts (and frustration).

Hi John,

Sounds frustrating!

Could you please provide the following information, to possibly help with trouble-shooting?

-The command used to start AOLserver (with all flags)

-an ls -ltr on /var/lib/aolserver/dev_divvy

The directions for file locations and ownership changed between 4.6.3 and 5.0 - you mention installing both - which set of directions were you using for file permissions/ownership?

BTW, I've done a couple OpenACS 5.0 installs on Debian (stable) without any problems, but I've been compiling postgres from source.

Definitely sounds like you have some sort of unix file permission snafu.

Hm, I never put up any PostgreSQL stuff on my personal website to go with my Oracle doc, so FYI, just in case it turns out to be relevent, here are my Postgres-related notes from c. 2003/02/09. This was with Debian 3.0 and its postgresql 7.2.1-2woody4 package. I successfully did some OpenACS development and testing using OpenACS 4.6.x and some versions of the CVS Head with this:

Differences for Debian:

The Debian PostgreSQL packages seem to work very nicely, but some of their default settings are differnt from the upstream source defaults used in the OpenACS install docs.

On Debian 3.0, you will definitely need all of these packages (I believe the intarray stuff in postgresql-contrib is needed by the OpenFTS search engine used by OpenACS.):

postgresql postgresql-client postgresql-contrib
and you may want or need these as well:
postgresql-doc postgresql-dev

The Debian packages come with a nice /etc/init.d/postgresql script, so you don't have to do anything special, just use it.

Note that the Debian packages do an initdb for you, locating it in $PGDATA which is /var/lib/postgres/data by default. If you wat to put it somewhere else you can either change PGDATA and do:

$ sudo /etc/init.d/postgresql stop
$ sudo su - postgres "initdb"
$ sudo /etc/init.d/postgresql start

Or manually specify the location with, e.g.:

$ sudo su - postgres "initdb -D /tmp/pg-test"

The Debian package already installs plpgsql for you, so you do not need to do:

$ sudo su - postgres "createlang plpgsql template1"
To verify, do:
$ sudo su - postgres "createlang -l template1"

By default, errors go to: /var/log/postgres.log

Startup scripts:

Just like for Oracle, on my own development machine (rather than a server), I prefer that PostgreSQL not startup automatically. I'll use the same S94 and K06 I used for Oracle:

The Debian packages install the equivalent of, which is ok for a server:

$ sudo /usr/sbin/update-rc.d postgresql defaults 20 20

So for a Debian desktop where Postgres is only used for testing I do:

$ sudo rm /etc/rc?.d/???postgresql
$ sudo /usr/sbin/update-rc.d postgresql stop 06 0 1 6 .
Collapse
Posted by John Luong on

Cathy,

Thanks for your response.

The following is how I start AOLServer.

dev_divvy@jetson:~$ /usr/local/aolserver/bin/nsd-postgres -t /var/lib/aolserver/dev_divvy/etc/config.tcl

The following is the result of a ls -ltr on /var/lib/aolserver/dev_divvy

dev_divvy@jetson:/var/lib/aolserver/dev_divvy$ ls -lrt
total 40
-rwx------    1 dev_divv web          2058 Dec  8 10:11 readme.txt
drwx------    2 dev_divv web          4096 Dec 11 05:18 bin
drwx------    2 dev_divv web          4096 Dec 11 05:18 content-repository-content-files
drwx------    2 dev_divv web          4096 Dec 11 05:18 tcl
drwx------    4 dev_divv web          4096 Dec 11 05:18 www
drwx------   21 dev_divv web          4096 Dec 11 05:18 packages
drwx------    4 dev_divv web          4096 Dec 11 05:18 etc
drwx------    2 dev_divv web          4096 Dec 11 05:18 database-backup
drwxr-xr-x    2 dev_divv web          4096 Dec 28 05:40 apm-workspace
drwx------    2 dev_divv web          4096 Jan  4 00:00 log
dev_divvy@jetson:/var/lib/aolserver/dev_divvy$

I realize the instructions changed. I did everything up to the tarball as OpenACS 5 and then decided to try to install OpenACS 4, because this site might go to production in a few months and I'm not sure I'd be comfortable putting out an OpenACS 5-alpha site.

After failing with the OpenACS 4.6.3 install, I decided to go fire up OpenACS 5, since I figured I could develop on OpenACS 5 for the most part and then port it back to 4.6.3 in a hosted environment if I did go production in the next few months.

Well, your unix file permissions are clearly wrong. Your files appear to all be readable only by you, dev_divv, but since AOLserver does not run as you that can't possibly work right. chmod them all to 644 or something like that. E.g.:
$ find . -type d -print | xargs chmod 755
$ find . -type f -print | xargs chmod 644
When starting AOLserver, you should probably also be including the options "-i -u some-user -g web" on the command line.

Also, what version of AOLserver are you using?

Might go to production in 3+ months? I'd just go with 5.0 then. I haven't really been keeping track but sounds like they've been stomping lots of bugs and will officially release 5.0 soon, I assume much less than 3 months from now.

Just wanted to post this for anyone finding this thread in the future...

I ran into this error today while installing OpenACS 5.2.3 on a Solaris 10 system at work.

It turned out that /var/tmp was owned by root and only root had write permission (!?). The Tcl core (in tclPipe.c) needs to create a temporary file to use as a sink for the stderr output for the pipeline. The "couldn't create error file for command" message was being generated by [open "|..."].

After chmod a+tw /var/tmp and restarting I'm able to proceed with the installation.

Now I'm able to proceed with the installation.