Question

Run flask application as root or modify ruby application

Posted December 23, 2014 3.8k views

I have a python flask application (https://github.com/Ottermad/PeterWakefieldSite on 178.62.75.68) which does allows a user to upload a file a then call a ruby program (https://github.com/benbalter/word-to-markdown) on that file. However, the terminal program needs root user permissions. So how can either configure my VPS to either run as root or how to mod the terminal app to not need root permissions.

1 comment
  • It sounds like the soffice process being used in the background for document conversion is the thing that is encountering permission issues for you. It is possible to start the soffice process in a headless state as a non-root user but appears to require some workarounds. This forum thread provides some more details on getting soffice running headless as a non-root user and once soffice is running as the same user as your web server the permission issue should be resolved.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

This question was answered by @ryanpq:

It sounds like the soffice process being used in the background for document conversion is the thing that is encountering permission issues for you. It is possible to start the soffice process in a headless state as a non-root user but appears to require some workarounds. This forum thread provides some more details on getting soffice running headless as a non-root user and once soffice is running as the same user as your web server the permission issue should be resolved.

View the original comment

Submit an Answer