Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pure-ftpd.conf Question 1

Status
Not open for further replies.

SeanAIX430

Technical User
Jun 29, 2001
189
Hello, I'm teaching myself how to setup a freebsd box with apache and an ftp site. I've gotten epache installed and running, and I have pure-ftpd running as well. I have a few little things I haven't found yet though. The main one being that on the pure-ftpd.conf file even though I commented out the chroot line, but when logging in as root I only have access to my desktop files. And I want to use this to upload my website. Also I'd like to make these 2 daemons start at boot. Thanks
 
For the FTP chroot question. One workaround is to create a user and assign his/her home directory to be the directory where the webfiles are located. That way even if someone breaks in with that account they are still chrooted to that directory.

As for startup there are a few options. You can add lines to the /etc/rc.local file. ie service httpd apache.
you can also add executable files to appropriate rc directory. If you boot graphically your run level is 5, if you boot to the shell your run level is 3. so for /etc/rc.d/rc3.d you can add a file into that directory that will be processes at startup. Yet another way is to have the service run under inetd or xinetd. Probably just starting out you might want to just add it in /etc/rc.local.

thanks,
Ben
 
I have an rc.d file in /usr/local/etc but I don't have an rc.local, I have searched with locate for that file and it's not on the machine?

I do boot into the command line interface, not a gui.
 
sorry about that I was thinking linux not freebsd. I believe in freebsd it is located in /usr/local/etc/rc.d/

thanks,
Ben
 
right that file does exist, but when I open it with vi to add the apache and ftp startup commands the file is not normal text. At the bottom of the screen it says Warning rc.d is not a regular file. Should I just add the lines anyways?
 
SeanAIX430,

If you want to have pure-ftp start at boot, you'll need to add it to your /etc/rc.local and /usr/local/etc needs to contain a shell script to start it.


Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
Well I've gotten apache to startup at boot, but I have to manually start Pure-ftpd. I've just installed php5 and don't know how to make it start? Thanks
 
SeanAIX430,

The documentation for Pure-ftp may help you out some. It is available at
As far as php5, I'm not sure what you mean by "don't know how to make it start". Do you need to configure your web server to parse files for php5 scripts? A basic tutorial for php is available at
Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
I thought php was a daemon like the rest, so I was looking for a start command. But I now have it installed correctly and a file with phpinfo() is giving the right stuff.

I'm now trying to send an email from that page but the email never arrives. How do I check to see if SMTP is running on my server?

Also I tried adding the line /usr/local/sbin/ure-ftpd & to my /etc/rc.conf file and it doesn't start so I took it out of there and added it to my inetd.conf file and it won't start from there either. Any ideas? Thanks
 
swabs,

If you haven't gone through the process of replacing Sendmail with another email daemon, then you should read up on Sendmail in the FreeBSD Handbook.

Also, If you can start Pure-ftp with the command /usr/local/etc/rc.d/pure-ftpd.sh start
then you should be able to get it to start at bootup by adding
pureftpd_enable="YES"
to your rc.conf.

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
Wish, you are the man! Yes it would make sense to enable a MTA if i expect the email to be sent huh? I added sendmail_enable to my rc.conf and rebooted and 2 minutes later I'm flooded with the 20 test messages I sent yesterday!

Also added the pureftpd enable and it starts as well now, although I can no longer ftp in as root, just as my test user account, so it's better than nothing.

Thanks a ton!
 
SeanAIX430,

Funny, I thought that Sendmail was enabled by default on FreeBSD.

As far as logging in as root, you may be able to change that by modifying /etc/pure-ftpd.conf, although it may intentionally deny root login as a security measure.

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top