[rhelv6-list] Curious vsftpd isssue

Jonathan Billings jsbillin at umich.edu
Tue Oct 16 01:28:33 UTC 2012


On Mon, Oct 15, 2012 at 08:59:35PM -0400, Cale Fairchild wrote:
> Today I discovered a peculiar issue with the vsftpd init scripts. My
> vsftpd daemon stopped authenticating properly because when I
> restarted the service as root the vsftpd daemon inherited the
> current root environment which included redirected TMP variable set
> to /root/tmp. Of course when it was set that way the selinux context
> was incorrect and the permissions on the directory itself was very
> restrictive. I worked around the problem by resetting my TMP and
> TMPDIR variables to /tmp and restarting the service again but I am
> wondering if this should be filed as a bug?

This is one of the reasons you should always use '/sbin/service'
instead of running the /etc/rc.d/init.d/<scriptname> directly.
The 'service' script scrubs your environment and sets the CWD to /
before executing the init script.  The only environment variables from
your root shell that are preserved are $TERM and $LANG.

--
Jonathan Billings <jsbillin at umich.edu>




More information about the rhelv6-list mailing list