CentOS 7 VSFTPD Unable to start the detailed

Source: Internet
Author: User
Tags rsyslog

Accidentally installed CentOS 7 (said more is the tears, all kinds of not adapt), but let It Go (PS: Do not use improvise clear, do not understand can Baidu. ), after loading the system to run a vsftpd,

Yum-y Install VSFTPD

Wait for the installation to complete (use the phone 2G flow that heart plug).

Start VSTFPD:

Service Start vsftpd (This command is no longer available now)

/ETC/INIT.D/VSFTD start (don't even think about it, there's no script)

What can I do about it? Of course it is systemctl, and this command is very useful in future versions and needs to be mastered.


Right now.

Systemctl list-unit-files |grep Vsftpd.service

The Vsftpd.service service was found to be closed as follows:

Vsftpd.service disabled

Yes, that's disable, and then start the service.

Systemctl Start Vsftp.service


Right now.

Systemctl list-unit-files |grep Vsftpd.service

Discover that the Vsftpd.service service was turned off as follows:

Vsftpd.service disabled

is not feeling blow.

There are a few solutions available on the web that do not solve the problem of shutting down the port and restarting the process.


It's all there is. This article: Separate said to open this service no, let's analyze the principle.

1> Check the status of the process

[Email protected] ~]# systemctl status Vsftpd.service

VSFTPD.SERVICE-VSFTPD FTP Daemon

loaded:loaded (/usr/lib/systemd/system/vsftpd.service; disabled)

Active:active (running) since a 2015-10-19 23:37:06 CST; 11min ago

Main pid:23165 (VSFTPD)

CGroup:/system.slice/vsftpd.service

└─23165/usr/sbin/vsftpd/etc/vsftpd/vsftpd.conf


October 23:37:06 localhost.localdomain systemd[1]: Started Vsftpd FTP daemon.

October 23:37:33 localhost.localdomain systemd[1]: Started Vsftpd FTP daemon.

October 23:38:39 localhost.localdomain systemd[1]: Started Vsftpd FTP Daemon

Here is a comment on the command (after all, everyone is from the small white, do not discriminate against white):

VSFTPD.SERVICE-VSFTPD FTP Daemon (open service will open Daemo, I do not understand the difference between the two, anyway, the book said)

Then the loaded (load)/usr/lib/systemd/system/vsftpd.service, and the failure, Mark here to say later.

Then the process number and the configuration file path are not explained.


The first three entries are logging attempts to start vsftp FTP daemon (if you do not understand Daemo simply understand as a service, personal opinion, do not accept the Master spit Groove).


Read this let's look at the log, CentOS 7 above the syslog, yes, it is not, hehe, the alternative is journalctl, as for this command does not explain, oneself can go to Baidu, here only need to know to use (JOURNALCTL-XN) good, information as follows:

October 23:37:06 localhost.localdomain systemd[1]: Started Vsftpd FTP daemon.

--Subject:unit Vsftpd.service has finished start-up

--DEFINED-BY:SYSTEMD

--Support:http://lists.freedesktop.org/mailman/listinfo/systemd-devel

--

--Unit Vsftpd.service have finished starting up.

--

--The start-up result is done.

Explain:

Start Daemon (yes I am a night owl,)

Vsftpd.service is terminated, the system makes a judgment (the translation is rough and easy to see, forgive me this English level four people have not),

And then the start result is already started (started, did not start up, do not report a mistake "embarrassed")

Then let go and Http://lists.freedesktop.org/mailman/listinfo/systemd-devel ask for help,

haha to here everyone should have been able to see what went wrong, if you don't see it doesn't matter, look down


Right is Vsftpd.service daemon start not up, the system also prompted a systemd-devel, we go to see Vsftpd.service Daemon (also above the small tail, is to see here)

Cat/usr/lib/systemd/system/vsftpd.service

[Unit]

DESCRIPTION=VSFTPD FTP Daemon

After=network.target


[Service]

Type=forking

Execstart=/usr/sbin/vsftpd/etc/vsftpd/vsftpd.conf


[Install]

Do not worry about this is certainly not a problem, I just want you to see the daemon file, you can modify the content of Execstart, of course, no one like me so boring, but if you want to let others can't find your configuration file is very useful, custom let them find.


Daemon no problem, there will be any problem ah, that is runlevel, immediately enter

Chkconfig--list vsftpd

Note: This output shows only the SysV service and does not contain the native SYSTEMD service. SysV configuration data may be overwritten by native SYSTEMD configuration.

If you would like to list the SYSTEMD service, please do ' systemctl list-unit-files '.

To view services enabled for a specific target, perform

' Systemctl list-dependencies [target] '.

(I have Chinese enabled.) )

Seems to make use of systemctl list-unit-files to view, walk up

Systemctl List-unit-files | grep vsftpd.service

This is not back to the original point, it is still:

Vsftpd.service disabled

Well, there is no way, then we have to run to the runlevel below to see what is the problem, there is this systemctl is the sacred.

Ll/etc/systemd/system/multi-user.target.wants

Total dosage 0

lrwxrwxrwx. 1 root root 35 October 18:07 Atd.service-/usr/lib/systemd/system/atd.service

lrwxrwxrwx. 1 root root 38 September 12:54 Auditd.service-/usr/lib/systemd/system/auditd.service

lrwxrwxrwx. 1 root root 37 September 12:50 Crond.service-/usr/lib/systemd/system/crond.service

lrwxrwxrwx. 1 root root 42 September 12:52 Irqbalance.service-/usr/lib/systemd/system/irqbalance.service

lrwxrwxrwx. 1 root root 46 September 12:51 Networkmanager.service-/usr/lib/systemd/system/networkmanager.service

lrwxrwxrwx. 1 root root 40 September 12:49 Remote-fs.target-/usr/lib/systemd/system/remote-fs.target

lrwxrwxrwx. 1 root root 39 September 12:52 Rsyslog.service-/usr/lib/systemd/system/rsyslog.service

lrwxrwxrwx. 1 root root 40 October 01:37 Sendmail.service-/usr/lib/systemd/system/sendmail.service

lrwxrwxrwx. 1 root root 41 October 01:37 Sm-client.service-/usr/lib/systemd/system/sm-client.service

lrwxrwxrwx. 1 root root 36 September 12:55 Sshd.service-/usr/lib/systemd/system/sshd.service

lrwxrwxrwx. 1 root root 37 September 12:55 Tuned.service-/usr/lib/systemd/system/tuned.service


Sure enough, systemctl by invoking the soft connection under the file to realize whether the service is started, of course, this article describes the Vsftpd.service soft connection, so can not start, careful reader must have found that the soft connection is The daemon of the service, the problem is easy to solve after finding the problem,

1> cd/etc/systemd/system/multi-user.target.wants

And then add

Ln-s '/usr/lib/systemd/system/vsftpd.service '/etc/systemd/system/multi-user.target.wants/vsftpd.service '

Create a connection manually

2> Everyone may be too troublesome, there is no easier way, the answer is also some, that is:

Systemctl Enable Vsftpd.service

And then view

Systemctl List-unit-files | grep vsftpd.service

The service is not up:

Vsftpd.service enabled


Note: Although everyone just ordered the wrong. The purpose of this article is to hope that we can learn to analyze the problem, rather than to do the hand party, the above is my steps to solve the problem, there are shortcomings welcome to correct,

Another: Please specify the source of the reprint.

This article is from the "Mu bai fringe" blog, please be sure to keep this source http://mubsky.blog.51cto.com/3081455/1704380

CentOS 7 VSFTPD Unable to start the detailed

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.