Run flask application as root or modify ruby application

December 23, 2014 2.3k 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.

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

Have another answer? Share your knowledge.