greetings
today i was expanding my knowledge of vsftpd on a low traffic CentOS 4 production environment server i have
fyi, i was working on learning to setup a chroot environment by the simple editing of /etc/vsftpd/vsftpd.conf
so, as i normally do when i start making changes i did this
cd /etc/vsftpd/ cp -a vsftpd.conf bak-vsftpd.conf
then i made the edits in /etc/vsftpd/vsftpd.conf that i needed to make for testing a chroot env for some users and saved my work
then i did this
service vsftpd stop service vsftpd start
and to my amazement when i did a
ps ax
that i saw the vsftpd process had taken bak-vsftpd.conf as it's default config file and looked something like this
8890 pts/0 S 0:00 /usr/sbin/vsftpd /etc/vsftpd/bak-vsftpd.conf
questions...
known issue?
can anyone duplicate?
is it a bug?????? or a feature???
;->
thanks and kind regards,
- rh
-- Robert Hanson - Abba Communications Computer & Internet Services (509) 624-7159 - www.abbacomm.net
On Jan 17, 2006, at 12:12 PM, Robert Hanson wrote:
known issue?
can anyone duplicate?
is it a bug?????? or a feature???
this is a feature.
here's the start() function for /etc/init.d/vsftpd:
start() { # Start daemons.
if [ -d /etc/vsftpd ] ; then for i in `ls /etc/vsftpd/*.conf`; do site=`basename $i .conf` echo -n $"Starting $prog for $site: " /usr/sbin/vsftpd $i & RETVAL=$? [ $RETVAL -eq 0 ] && { touch /var/lock/subsys/$prog success $"$prog $site" } echo done else RETVAL=1 fi return $RETVAL }
look at the loop that starts on the fifth line of the function; this loops through every .conf file in the vsftpd config directory (thus enabling you to run multiple ftp sites with different configurations off of a single machine).
if you want your backup file to be exempt, call it "vsftp.conf.bak" instead. i'm surprised this issue hasn't bitten you earlier.
-steve
--- If this were played upon a stage now, I could condemn it as an improbable fiction. - Fabian, Twelfth Night, III,v
} this is a feature. } here's the start() function for /etc/init.d/vsftpd: } } start() { } # Start daemons. } } if [ -d /etc/vsftpd ] ; then } for i in `ls /etc/vsftpd/*.conf`; do } site=`basename $i .conf` } echo -n $"Starting $prog for $site: " } /usr/sbin/vsftpd $i & } RETVAL=$? } [ $RETVAL -eq 0 ] && { } touch /var/lock/subsys/$prog } success $"$prog $site" } } } echo } done } else } RETVAL=1 } fi } return $RETVAL } } } } look at the loop that starts on the fifth line of the function; this } loops through every .conf file in the vsftpd config directory (thus } enabling you to run multiple ftp sites with different configurations } off of a single machine). } } if you want your backup file to be exempt, call it "vsftp.conf.bak" } instead. i'm surprised this issue hasn't bitten you earlier. } } -steve
interesting, i didnt think of looking there at the time...
and you are right, when i save files i usually go the other way around... like
cp -a something.conf something.conf.bak
im not sure i would consider it a feature though ;->
realistically, it is something that should have to be "enabled" or "toggled", yet... im not the boss of the upstreams
thanks :-)
- rh
-- Robert Hanson - Abba Communications Computer & Internet Services (509) 624-7159 - www.abbacomm.net