Appy & LibreOffice running as different users leads to tmp directory permission issues
Setup:
In Ubuntu 12.04, default LibreOffice installed, running appy 0.8.1 we downloaded and installed by hand.
Goal:
We want to the python code using appy run as one user while the libreoffice runs as another user. How do we get the two user setup to work? (Read below before you answer.)
Problem:
In our development environments we run a python based web application that calls appy and uses libreoffice to generate PDFs and other .doc and .odt files. In the development environment the web app and libreoffice run as the same linux level user and everything works fine. However in our testing area, where we have a two user setup, there is file permission related issues discussed in detail below.
Details:
In our testing (and production) environments, to enhance compartmentaliz
When the system runs as two separate users, appy fails with an exception (see the very bottom of this message) when trying to make things like the PDFs. We traced it down to what appears to be file permissions issue on temp directory (under the final output file location) that is created by appy. It appears that something (office? appy?) needs write access to that tree which was not allowed by the default setup and permission with these two user accounts. (The by default the dir would be owned by the www-data without group or other write permission). Our solution was the following:
1. make a linux group called "cache", put both the www-data and the officeuser as members
2. set the group set id bit on the main tmp directory -- to force group ownership of all new files/directories to be the cache group
3. made the following change around appy/pod/
absResult = os.path.
try:
except OSError, oe:
raise PodError(
4. run webapp as www-data & libreoffice as officeuser ... now they can communicate and share the tmp space
Questions:
(A) Does anyone have another solution that will achieve the two separate users (without making changes to appy above)?
(B) Is there another way to achieve the umask and file permissions effect without modifing appy directly with some shell magic?
(C) We would prefer not to have to modify appy every time there is an update. Are the appy authors aware of an alternative?
(D) Is it assumed by appy that it will run as the same user as libreoffice/
All the best,
Ryan
=== Exception BEGIN ===
...
File "/home/
renderer.run()
File "/home/
self.finalize()
File "/home/
raise PodError(
PodError: An error occurred during the conversion.
Traceback (most recent call last):
File "/home/
ConverterSc
File "/home/
converter.run()
File "/home/
self.
File "/home/
self.
__main_
=== Exception END ===
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Appy Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: