# Vsftpd woes - doesn't start, odd error



## gman88 (Aug 1, 2010)

I am now a whopping 5 or 6 weeks into my FreeBSD "experience" and, lo and behold, another oddball problem.  I had built vsftpd from ports - a pretty standard deal, I think.  I just did the following: cd /usr/ports/ftp/vsftpd - make install clean.  Actually, I failed to choose an option, once (NR_*...something) and I deinstalled and reinstalled as it would not interact with the /etc/rc.conf file (to start at boot time) without this option.  So, I reinstalled and put a file at /usr/local/etc/rc.d/vsftpd.sh that I copied from  /usr/ports/ftp/vsftpd/files/vsftpd.sh.in (something like that).  I'd read that this should be copied to start the thing at boot time (along with vsftpd_enable="YES" in /etc/rc.conf).   Actually, first I wrote a simple .sh file that  said "/usr/local/libexec/vsftpd &" (whith a shebang line, chmodded executable) and it worked - for awhile. It was just a guess - and it actually did work for a few boots.  That crapped out, I did some research, and copied the correct file (as described) to /usr/local/etc/rc.d. It worked fine for about 6 hours.  I was logging in all over the place - it worked fine (and it worked fine after multiple reboots).  Then - suddenly, and with no intervention from myself other than logging in and uploading files - it failed on one reboot.  And, I absolutely cannot get it working, now.   There's an error, when it boots up, which contains some stuff like this (this is not exactly what it says - the box is at work, I'm at home): ERROR %%RC_SUBR%% rc_ command="%%PREFIX%%/libexec/$name".  I don't know - I'm not a programmer.  But that's what I could find on the net, here at the house, that looked like what I saw.  I've used vsfptd, for 6 or 7 years on Linux, and it's like the Energizer Bunny.  It's simple, secure, and just keeps going and going.  How does it suddenly just "change" on FreeBSD and begin behaving differently (not starting at boot time)...?  What the hell is wrong with this darned thing?


----------



## DutchDaemon (Aug 1, 2010)

Does your computer have an [enter] button? You might want to use it to make your posts readable .. and then use proper posting tags: http://forums.freebsd.org/showthread.php?t=8816


----------



## DutchDaemon (Aug 1, 2010)

Original post by gman88, reworked:
----------------------------------------------------------------------------------------------

I am now a whopping 5 or 6 weeks into my FreeBSD "experience" and, lo and behold, another oddball problem. 

I had built vsftpd from ports - a pretty standard deal, I think. I just did the following: `cd /usr/ports/ftp/vsftpd && make install clean`. 

Actually, I failed to choose an option, once (NR_*...something) and I deinstalled and reinstalled as it would not interact with the /etc/rc.conf file (to start at boot time) without this option. 

So, I reinstalled and put a file at /usr/local/etc/rc.d/vsftpd.sh that I copied from /usr/ports/ftp/vsftpd/files/vsftpd.sh.in (something like that). I'd read that this should be copied to start the thing at boot time (along with vsftpd_enable="YES" in /etc/rc.conf). 

Actually, first I wrote a simple .sh file that said 
	
	



```
/usr/local/libexec/vsftpd &
```
 (whith a shebang line, chmodded executable) and it worked - for awhile. It was just a guess - and it actually did work for a few boots. That crapped out, 

I did some research, and copied the correct file (as described) to /usr/local/etc/rc.d. It worked fine for about 6 hours. I was logging in all over the place - it worked fine (and it worked fine after multiple reboots). Then - suddenly, and with no intervention from myself other than logging in and uploading files - it failed on one reboot. 

And, I absolutely cannot get it working, now. There's an error, when it boots up, which contains some stuff like this (this is not exactly what it says - the box is at work, I'm at home): 
	
	



```
ERROR %%RC_SUBR%% rc_ command="%%PREFIX%%/libexec/$name"
```

I don't know - I'm not a programmer. But that's what I could find on the net, here at the house, that looked like what I saw. I've used vsfptd, for 6 or 7 years on Linux, and it's like the Energizer Bunny. It's simple, secure, and just keeps going and going. How does it suddenly just "change" on FreeBSD and begin behaving differently (not starting at boot time)...? What the hell is wrong with this darned thing?


----------



## gman88 (Aug 1, 2010)

*My apologies.....*

Good point, Dutch, and my apologies...  That was extraordinarily hard on the eyes and difficult to follow given the tangential manner in which it was written/presented.

And - I ran out to to the local computer shop and purchased a keyboard that included an [ENTER] key.  Much like Homer Simpson, however, I am still struggling to find one that includes the [ANY] key -as in "Press ANY key to continue....".


Just thought I'd lighten the mood. * Point well taken.*
:\


----------



## wblock@ (Aug 1, 2010)

DutchDaemon said:
			
		

> Original post by gman88, reworked:
> 
> So, I reinstalled and put a file at /usr/local/etc/rc.d/vsftpd.sh that I copied from /usr/ports/ftp/vsftpd/files/vsftpd.sh.in (something like that).



That won't work, because those files are modified when the port is installed.



> I'd read that this should be copied to start the thing at boot time (along with vsftpd_enable="YES" in /etc/rc.conf).
> 
> And, I absolutely cannot get it working, now. There's an error, when it boots up, which contains some stuff like this (this is not exactly what it says - the box is at work, I'm at home):
> 
> ...



When the port is installed, %%PREFIX%% is substituted with the local $PREFIX, usually /usr/local.  You can't just take that raw file and use it.  Also, copying files around like that will make problems for you later when you want to deinstall or upgrade the port.  The reason for the ports is minimize that sort of thing.

So deinstall the port:
`# cd /usr/ports/ftp/vsftpd; make deinstall`

Clear the options to default and set any additional options needed:
`# make rmconfig; make config`

Then build it and install it:
`# make install clean`


----------

