Hi I am tring to follow the How to for centOs 5.1 and have a few questions. I got to the step where I edit the init script for Proftpd. (Now create the init script /etc/init.d/proftpd Should the file already exist or do I create it from scratch? Ok I have created it from scratch and entered in the script then chmod to 755 this is ok then moded the other files as per the tutorial. i then create the system startup links for Proftpd by command :- chkconfig --levels 235 proftpd on This gives me an error service proftpd dose not support chkconfig if you try and start proftpd you get the error deamon: command not found error. I have not got much experiance with this OS so any help would be greatfully received Colin
You create it from scratch. Please make sure that your copy looks exactly like the one from the tutorial (incl. comments).
Hi I am also following the same tutorial and trying to get this to work and I am having the same error as the person above that says: "service proftpd does not support chkconfig" I have created the file from scratch and checked it several times and it is exactly the same as it says on the howto article.. I noticed the person above posted this in December (so not too long ago), could it possibly be an update or something which might be stopping this from working? Another note, I am running this on VMWare just to test it out before I setup a new system. Using VMWare instead of a physical system shouldn't affect it at all should it? If anyone has any ideas how to solve this error I would be greatful for any reply or troubleshooting steps p.s. Did you get anywhere with yours Colin? Thanks. Rob.
I've got the service to run now which is a start I guess. I never thought to try starting the service manually, I did this and it then threw up an error about the user group setting in /etc/proftpd.conf which I must have missed when I edited the file before so I have amended that and the service starts. Now I just have to try and work out what's wrong with the boot script. Any replies are welcome Thanks. Rob.
Did you save the init script with Unix or with Windows linebreaks? If you edited the script on a Windows system and then copied it over to your Linux system, you most likely have Windows linebreaks in it, unless you used an editor which can save files with Unix linebreaks.
Hi thanks for your reply. I used the 'nano' editor on the CentOS install (I couldn't work out how to use vi) Should nano be ok? Thanks. Rob.
Thanks for your reply Code: #!/bin/sh # $Id: proftpd.init,v 1.1 2004/02/26 17:54:30 thias Exp $ # # proftpd This shell script takes care of starting and stopping # proftpd. # # chkconfig: - 80 30 # description: ProFTPD is an enhanced FTP server with a focus towards \ # simplicity, security, and ease of configuration. \ # It features a very Apache-like configuration syntax, \ # and a highly customizable server infrastructure, \ # including support for multiple 'virtual' FTP servers, \ # anonymous FTP, and permission-based directory visibility. # processname: proftpd # config: /etc/proftpd.conf # pidfile: /var/run/proftpd.pid # Source function library/ . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 [ -x /usr/sbin/proftpd ] || exit 0 RETVAL=0 prog="proftpd" start() { echo -n $"Starting $prog: " daemon proftpd RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/proftpd } stop() { echo -n $"Shutting down $prog: " killproc proftpd RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/proftpd } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status proftpd RETVAL=$? ;; restart) stop start ;; condrestart) if [ -f /var/lock/subsys/proftpd ]; then stop start fi ;; reload) echo -n $"Re-reading $prog configuration: " killproc proffftpd -HUP RETVAL=$? echo ;; *) echo "Usage: $prog {start|stop|restart|reload|condrestart|status}" exit 1 esac exit $RETVAL Thanks. Rob.
Is the init script executable? Does its header look similar to the other init scripts, especially the Code: # chkconfig: - 80 30 line?
It's executable and the chkconfig line was similar but the numbers on the other init scripts that I looked at were different. I gave up in the end and reinstalled the system starting from scratch (the cheats way out, lol). Thanks very much for your help though falko it is very much appreciated. I will probably have a look at some other howto's on the site so you may see me around here again soon if I run into any problems Thanks again. Rob.
Did anyone find a reason why? Hello, i ran into the same issue. Did anyone ever find a reason of why this happens, or even better what the fix is? Thx, newbie
holy crappp i got it to work i commented out the following lines of code, because at one point the OS was telling me that there was something wrong with line item number 66.... what i commented out was: #condrestart) #if [ -f /var/lock/subsys/proftpd ]; then # stop # start #if #;; so is there someone that could help me out on figuring out what the right syntax would be for the snippet of code? thx, newbie
holy crappp i got it to work i commented out the following lines of code, because at one point the OS was telling me that there was something wrong with line item number 66.... what i commented out was: #condrestart) #if [ -f /var/lock/subsys/proftpd ]; then # stop # start #if #;; so is there someone that could help me out on figuring out what the right syntax would be for the snippet of code? thx, newbie
Hi ra2833, In the end I gave up on mine and formatted and reinstalled the server, it's probably not the most useful solution but it's the only way I could get it to work. I'm guessing I must have overlooked something simple which was causing it not to work but in the end I didn't have the time to sit down and work it out. Sorry I couldn't be of more help. Rob.
I was having the same problem and figured it out. It was a typeo on my part.... I had... # chkconfig - 80 30 after comparing to other files, it became apparent you need a semi colon after the chkconfig command. Changed it to... # chkconfig: - 80 30 and I was all set. Hope this helps anyone who stumbles across this.