6

I installed vsftpd on ubuntu 14.04 and when I want to stop or restart vsftpd service this message showed and nothing happened in service status!

root@ali-lap:/home/ali# service vsftpd restart
stop: Unknown job: vsftpd
start: Unknown job: vsftpd

I purged vsftpd and reinstall that again according to this post and nothing changed.

Install and delete log:

root@ali-lap:/home/ali# apt-get purge --remove vsftpd 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  vsftpd*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 370 kB disk space will be freed.
Do you want to continue? [Y/n] 
(Reading database ... 216263 files and directories currently installed.)
Removing vsftpd (3.0.2-1ubuntu2) ...
initctl: Unknown job: vsftpd
Purging configuration files for vsftpd (3.0.2-1ubuntu2) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for man-db (2.6.6-1) ...
root@ali-lap:/home/ali# ls -lpa /etc/vsftpd
vsftpd/           vsftpd.conf.orig  
root@ali-lap:/home/ali# ls -lpa /etc/vsftpd.conf
ls: cannot access /etc/vsftpd.conf: No such file or directory
root@ali-lap:/home/ali# apt-get install vsftpd 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  vsftpd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/112 kB of archives.
After this operation, 370 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package vsftpd.
(Reading database ... 216210 files and directories currently installed.)
Preparing to unpack .../vsftpd_3.0.2-1ubuntu2_amd64.deb ...
Unpacking vsftpd (3.0.2-1ubuntu2) ...
Processing triggers for man-db (2.6.6-1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up vsftpd (3.0.2-1ubuntu2) ...
initctl: Unknown job: vsftpd
Processing triggers for ureadahead (0.100.0-16) ...
root@ali-lap:/home/ali# ls -lpa /etc/vsftpd.conf
-rw-r--r-- 1 root root 5654 مه    16  2013 /etc/vsftpd.conf

vsftpd version:

root@ali-lap:/home/ali# apt-cache policy vsftpd 
vsftpd:
  Installed: 3.0.2-1ubuntu2
  Candidate: 3.0.2-1ubuntu2
  Version table:
 *** 3.0.2-1ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

Any ideas?

  • 1
    Odd. It works for me. Although other commands, such as /etc/init.d/vsftpd restart and start vsftpd don't work. – Seth Mar 17 '14 at 18:25
  • Yes, same problem for me and in the folder /etc/init.d, the service is'nt here. I have very problem in the 14 version of ubuntu – user78111 Jul 20 '14 at 14:17
3

Try with sudo, it seems a bug or that you don't have permissions over service with root.

$ sudo service vsftpd status

should work, indeed is working now for me in front of my eyes.

| improve this answer | |
  • That's worked perfectly !! sudo service vsftpd restart vsftpd stop/waiting vsftpd start/running, process 22783 // is this a bug ? – alireza Mar 17 '14 at 19:22
5

I had a similar problem and discovered that it's caused by an environment variable. When you use su, it leaves the UPSTART_SESSION environment variable set (from the original user's environment), which breaks things. Using sudo or su - unsets it, so any of these will work:

$ sudo service vsftpd restart
$ sudo su
# service vsftpd restart
$ su -
# service vsftpd restart
$ su
# unset UPSTART_SESSION
# service vsftpd restart
| improve this answer | |
  • 1
    Hi Michael, thanks for the edit, but just for correctness, su does not set the UPSTART_SESSION; instead, su leaves that variable set (from the original user's environment), whereas "su -" and "sudo su" unset it. – jsveiga Apr 22 '14 at 0:06

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