Question

Run flask application as root or modify ruby application

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.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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