Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a problem with my openoffice.org on a RedHad version of linux.

OpenOffice is successfully installed and from the command line if I run the following as root I get:

[root@s15548792 ~]# /usr/bin/ooffice "StarOffice.ServiceManager" -headless &
[1] 17321
[root@s15548792 ~]# ps | grep soffice.bin
17331 pts/0    00:00:00 soffice.bin

When I change the user apache I get this:

[root@s15548792 ~]# su apache
bash-3.2$ /usr/bin/ooffice "StarOffice.ServiceManager" -headless &
[1] 17341
bash-3.2$ [Java framework] Error in function createSettingsDocument (elements.cxx).
javaldx failed!

[1]+  Done                    /usr/bin/ooffice "StarOffice.ServiceManager" -headless
bash-3.2$ ps -u `whoami` | grep soffice.bin
bash-3.2$

Its obviously a user issue but it looks to me like all of the OpenOffice.org files are owned by apache. I have searched for days now and the main solutions seems to be changing the owner of ~/.config to apache but I cant figure out how to do it.

If it helps when I run the comand using php I get the following output

[0] => Trying to open office... . /usr/bin/ooffice
[1] => [Java framework] Error in function createSettingsDocument (elements.cxx).
[2] => javaldx failed!
[3] => creation of executable memory area failed: Permission denied
[4] => creation of executable memory area failed: Permission denied
[5] => creation of executable memory area failed: Permission denied
[6] => creation of executable memory area failed: Permission denied
[7] => creation of executable memory area failed: Permission denied
[8] => creation of executable memory area failed: Permission denied
[9] => timeout - office could not be started

Also the file /usr/bin/ooffice contains the following:

#!/bin/sh
exec openoffice.org "$@"

Any help would be much apreciated.

share|improve this question

2 Answers 2

I was having similar problem (with similar messages):

On our server nginx runs under user www-data. When we run OpenOffice (or any other applications we use), for security reasons we run it under user www-apps (user www-data is able to sudo to www-apps).

Unfortunately, I was getting this:

www-data@server:/tmp$ sudo -u www-apps /bin/bash
www-apps@server:/tmp$ oowriter -headless -nologo -norecovery -p report-8846.odt
[Java framework] Error in function createSettingsDocument (elements.cxx).
javaldx failed! 
creation of executable memory area failed: Permission denied

The problem was that I needed to run the sudo command with -H argument to change the home directory from /home/www-data to /home/www-apps. Than it worked like a charm.

share|improve this answer

You may have fixed this problem by now, but if not, find out the home directory for user apache by doing cat /etc/passwd | grep apache (the home directory will be the last but one field in the line). Set this directory to be writable by user apache. In my case, this fixed the problem (though I am not using apache, but am using lighttpd, in which case I had to do this to /var/www/ and set it to writable by www-data).

However, I am a novice at server management, and have no idea if this will make your web server insecure.

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.