linux - node.js read protected files without running as root -
i'd read/write files using nodejs live in protected directory (/etc/apache2/sites-available). understand can run script sudo thought of makes me worried. there way can have node seek elevate functions/calls without having whole script run root access?
if not provide elevated rights script, script unable mysteriously obtain rights out of lean air.
granted still need modify files, consider giving write permissinos app.
if running app user joe, , owner of sites-available files root, do: chown -r joe:joe sites-available.
but if other user uses files, might permissions conflict. in case, can workaround using shared group, or ssh user.
shortly, there several ways of achieving goal. unrelated node.js technology, , linux, chown , chmod.
linux node.js security
No comments:
Post a Comment