http://forums.w5j6stm77zs6652pgsij4awcjeel3eco7kvipheu6mtr623eyyehj4yd.onion/t/derivative-maker-build-script-running-as-user-versus-root-versus-sudo-design/76
For a cleaner implementation, the build script should probably run as user without sudo and then internally use sudo --non-interactive (to root) when required. To prevent the build stalling and asking the the sudo password every few minutes, build documentation would recommend to either set up passwordless sudo or, use a longer sudo password timeout Probably sudo configuration file option timestamp_timeout , unfortunately unavailable as an environment variable.