4

Below is the error I am getting when unoconv command is run as apache, with root it works fine.

[root@tux1 apache]# sudo -u apache unoconv -f pdf /var/www/html/testing/example.xlsx

creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
creation of executable memory area failed: Permission denied
Error: Unable to connect or start own listener. Aborting.

AbraCadaver
  • 78,200
  • 7
  • 66
  • 87
Raghunath
  • 61
  • 1
  • 5

3 Answers3

7

Ok this may be a stupid way to get around it but here goes...

Something in the chain of tools wants a home directory. The user for Apache doesn't have a home directory.

My Apache2 runs as www-data.

So:

mkdir /home/www-data
chown www-data:www-data /home/www-data

Voila! No more errors.

If I were a real geek I would fix the problem further up the tool chain but I'm not so there.

AbraCadaver
  • 78,200
  • 7
  • 66
  • 87
  • I'm using a different user and I'm getting the same error. Can you please help me? – fawad Nov 14 '12 at 14:30
  • Saved my day I was starting to despair about how to generate pdfs on the server with libreoffice headless not working without X and unoconv seemingly not working depending on user?!? Thx so much! – joelhoro Jun 09 '13 at 19:45
0

I had this error when converting .docx or .doc to HTML using unconv via PHP on Apache:

Error: Unable to connect or start own listener. Aborting.

Eventually, I worked out the issue was with the www-data user not being able tom write to its home folder (in my case at /var/www). I fixed the permissions and the error was sorted.

Dave Child
  • 7,573
  • 2
  • 25
  • 37
0

i have added .config and .cache sub-folders with www-data user permissions and kept the root on /var/www/ https://stackoverflow.com/a/70891861/8187662

AssyK
  • 37
  • 1
  • 6