2008
06.22
06.22
Most Ubuntu users are somewhat familiar with sudo. One of sudo’s security features makes sure your parent environment is cleaned before dropping downto root. Generally you want this! However I didn’t.
When running pure-ftpd with it’s password database in a nonstandard location, it’s possible to pass the PURE_PASSWDFILE and PURE_DBFILE variables to all of it’s binaries (including pure-pw). But obviously sudo think it’s all a bit too risky, and throws them away while executing pure-pw as root. Bummer!
Lucky for me, this is easily fixed. You can instruct sudo to keep specific environmental variables, like so (in /etc/sudoers):
Defaults env_keep=”PURE_PASSWDFILE PURE_DBFILE”
Defaults env_reset

No Comment.
Add Your Comment