1

I edited /etc/vsftpd.conf on my remote server. Now to restart the vsftpd, I ran

ravbholua@ravi:~$ sudo /etc/init.d/vsftpd restart
[sudo] password for ravbholua: 
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service vsftpd restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop vsftpd ; start vsftpd. The restart(8) utility is also available.
vsftpd stop/waiting
vsftpd start/running, process 4658

The above command has already been executed and I see the system works as per the new change.

Now looking at the above command output, I wanted to use service utility. So I changed the configuration file again and ran the below:

service vsftpd restart

But the above command didn't work (I came to know this as the system fails to behave as per the new change).

Now when I enter the 1st command again , i.e.

sudo /etc/init.d/vsftpd restart

the system behaves as per the latest change.

In nutshell, sudo /etc/init.d/vsftpd restart works but not service vsftpd restart

Where am I mistaken in my thinking?

1

I did your command:

/etc/init.d/vsftpd restart
ps ax |egrep -i ftp 

My output was :

root@mohsen-VirtualBox:/home/mohsen# ps ax |egrep -i ftp
 1710 ?        Ss     0:00 /usr/sbin/vsftpd
 2736 pts/1    S+     0:00 egrep --color=auto -i ftp

Put output of service command

Did you get :

root@mohsen-VirtualBox:/home/mohsen# service vsftpd restart
vsftpd stop/waiting
vsftpd start/running, process 2752

How you find out your vsfpt is not running?

  • $ service vsftpd restart stop: Rejected send message, 1 matched rules; type="method_call", sender=":1.23" (uid=1001 pid=5078 comm="stop vsftpd ") interface="com.ubuntu.Upstart0_6.Job" member="Stop" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="init") start: Rejected send message, 1 matched rules; type="method_call", sender=":1.24" (uid=1001 pid=5075 comm="start vsftpd ") interface="com.ubuntu.Upstart0_6.Job" member="Start" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="init") ravbholua@ravi:~$ – Ravi Oct 5 '13 at 16:49
  • oh my GOD, you should add soudo for service command: sudo service vsftpd restart – PersianGulf Oct 5 '13 at 17:03
  • Great! Thanks for your assistance. Yes sudo is required for the same. May I ask you one related thing: what was happening with the command service vsftpd restart ,i.e. without sudo? – Ravi Oct 6 '13 at 12:04
  • Look at my output please: (Why so many instances running of vsftpd?) ravbholua@ravi:~$ ps ax |egrep -i ftp 8123 ? Ss 0:00 /usr/sbin/vsftpd 8126 ? Ss 0:00 /usr/sbin/vsftpd 8127 ? S 0:00 /usr/sbin/vsftpd 8133 pts/0 S+ 0:00 egrep --color=auto -i ftp ravbholua@ravi:~$ – Ravi Oct 6 '13 at 12:07
  • @Ravi , sudo just ask you introduce yourself as root, service command need run as root user. – PersianGulf Oct 6 '13 at 12:58
0

The restart command does not use the new Upstart configuration. There are a few other things it does not do. Please see the following for details: http://upstart.ubuntu.com/cookbook/#restart

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.