Modify

Opened 12 years ago

Last modified 10 years ago

#11125 new defect

OSError: [Errno 13] Permission denied

Reported by: anonymous Owned by: Boris Savelev
Priority: normal Component: DocRenderPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description (last modified by Ryan J Ollos)

Hello I've installed everything but I got the error:

Warning: HTML preview using DocRenderer failed (OSError: [Errno 13] Permission denied)

I tried:

chown -R apache:apache /usr/local/bin/ooextract.py
chmod -R g+w /usr/local/bin/ooextract.py

but no success

soffice is running:

4 S     0 24990     1  2  80   0 - 168206 poll_s pts/0   00:00:00 soffice.bin

from the path:

SOFFICE_PATH="/opt/libreoffice4.0/program/soffice.bin"

Attachments (0)

Change History (16)

comment:1 Changed 12 years ago by anonymous

hello

fedora/centos/rhel? selinux enabled?

comment:2 Changed 12 years ago by anonymous

centos

thanks

comment:3 Changed 12 years ago by anonymous

selinux disabled I guess

[root@srvtrac ~]# cat /etc/sysconfig/selinux
cat: /etc/sysconfig/selinux: No such file or directory
[root@srvtrac ~]# sestatus
-bash: sestatus: command not found

comment:4 Changed 12 years ago by Boris Savelev

maybe more info in logs? audit.log, apache2/error.log?

comment:5 Changed 12 years ago by anonymous

trac.log: no new logs

/var/log/audit/audit.log: no new logs

/var/log/httpd/error_log: no new logs

/var/log/httpd/access_log:

192.168.105.12 - - [29/May/2013:12:36:53 +0200] "GET /trac/projects/attachment/ticket/517/Problema-sovrapposizione-indirizzi-2013-05-27.doc HTTP/1.1" 304 - "http://srvtrac/trac/projects/ticket/517" "Mozilla/5.0 (Windows NT 6.0; rv:22.0) Gecko/20100101 Firefox/22.0"

comment:6 Changed 12 years ago by Boris Savelev

ok. try to get it works manualy:

chmod a+x /usr/local/bin/ooextract.py

and run

/usr/local/bin/ooextract.py --connection-string=OOO_SOCKET --format=doc --stdout FILENAME

with your OOO_SOCKET and FILENAME

comment:7 Changed 12 years ago by anonymous

[root@srvtrac ~]# /usr/local/bin/ooextract.py --connection-string=socket,host=localhost,port=8100 --format=doc --stdout /root/test.tmp
Traceback (most recent call last):
  File "/usr/local/bin/ooextract.py", line 4, in <module>
    import uno
ImportError: No module named uno

comment:8 Changed 12 years ago by anonymous

comment:9 Changed 12 years ago by anonymous

same

[root@srvtrac ~]# export set LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/libreoffice4.0/ure/lib/:/opt/libreoffice4.0/program/

[root@srvtrac ~]# /usr/local/bin/ooextract.py --connection-string=socket,host=localhost,port=8100 --format=doc --stdout /root/test.tmp

Traceback (most recent call last):
  File "/usr/local/bin/ooextract.py", line 4, in <module>
    import uno
ImportError: No module named uno

comment:10 Changed 12 years ago by anonymous

I added the path to uno.py to python path:

export set PYTHONPATH=$PYTHONPATH:/opt/libreoffice4.0/program

then it went a little further:

[root@srvtrac ~]# /usr/local/bin/ooextract.py --connection-string=socket,host=localhost,port=8100 --format=doc --stdout /root/test.tmp
Traceback (most recent call last):
  File "/usr/local/bin/ooextract.py", line 4, in <module>
    import uno
  File "/opt/libreoffice4.0/program/uno.py", line 21, in <module>
    import pyuno
ImportError: dynamic module does not define init function (initpyuno)

but pyuno.py seems to be missing
it doesn't exist inside libreoffice tree

comment:11 Changed 12 years ago by anonymous

checked: pyuno.so and libpyuno.so are already inside /opt/libreoffice4.0/program
I fired my last bullet...

comment:12 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)

comment:13 Changed 12 years ago by Boris Savelev

where you get libreoffice? /opt/libreoffice4.0 says that it doesn't default package

comment:15 Changed 12 years ago by anonymous

I never rebooted the server after the installations (Libreoffice included).
may I need to reboot it?
(must wait 'till tonight as it's in use)

comment:16 Changed 10 years ago by anonymous

The problem might be that pyuno.so that comes with libreoffice was built for python 3 and your machine has python 2 installed.

libreoffice comes with a version of python that works with its pyuno.so so you want to use that to run ooextract.py

Check that you have pyuno.so and python in /opt/libreoffice4.0/program and if so copy there ooextract.py and modify docrenderer.py cmd array to start with

cmd = ['/opt/libreoffice4.0/program/python','/opt/libreoffice4.0/program/ooextract.py',

you might need to detab ooextract.py as python 3 does not run files with mixed indentation

Last edited 10 years ago by Ryan J Ollos (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Boris Savelev.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.