无法启动vsftp(ubuntu11.04) [論壇 - 新手村]


正在瀏覽:   1 名遊客


 到底部   前一個主題   下一個主題  [無發表權] 請登錄或者註冊

(1) 2 »


訪客
无法启动vsftp(ubuntu11.04)
Anon:訪客
1.sudo /etc/init.d/vsftpd restart
不可行
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 start/running, process 6817
2.start vsftpd
不可行
start: Rejected send message, 1 matched rules; type="method_call", sender=":1.112" (uid=1000 pid=6852 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="/sbin/init"))
pengtao@pengtao-X51L:~$ vsftpd start
500 OOPS: cannot read config file: start
pengtao@pengtao-X51L:~$ sudo vsftpd start
500 OOPS: cannot read config file: start
pengtao@pengtao-X51L:~$ /etc/init.d/vsftpd restart
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.
start: Rejected send message, 1 matched rules; type="method_call", sender=":1.114" (uid=1000 pid=7132 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="/sbin/init"))
3.service vsftpd restart
不可行
restart: Rejected send message, 1 matched rules; type="method_call", sender=":1.115" (uid=1000 pid=7581 comm="restart vsftpd ") interface="com.ubuntu.Upstart0_6.Job" member="Restart" error name="(unset)" requested_reply=0 destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init"))
请问,如何解决?

2011/5/28 13:31 | 0a846 ec37f 3262f c76aa
應用擴展 工具箱
回覆: 无法启动vsftp(ubuntu11.04)

註冊日期:
2009/12/6 10:32
所屬群組:
已註冊使用者
等級: 71
HP : 1053 / 1756
MP : 4456 / 70809
EXP: 24
離線
sudo restart vsftpd

sudo start vsftpd
sudo stop vsftpd
sudo restart vsftpd

2011/5/28 14:06
應用擴展 工具箱
訪客
回覆: 无法启动vsftp(ubuntu11.04)
Anon:訪客
sudo start vsftpd
start: Job failed to start
sudo restart vsftpd
restart: Unknown instance:
不行

2011/5/28 14:34 | 0a846 ec37f 3262f c76aa
應用擴展 工具箱
訪客
回覆: 无法启动vsftp(ubuntu11.04)
Anon:訪客
重新卸载,重新安装了,
sudo start vsftpd
有反映了,可是我在浏览器中输入
ftp://192.168.1.100,出现
Unable to connect Firefox can't establish a connection to the server at 192.168.1.100.
我的配置文件
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
#
# Run standalone? vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
listen=YES
#
# Run standalone with IPv6?
# Like the listen parameter, except vsftpd will listen on an IPv6 socket
# instead of an IPv4 one. This parameter and the listen parameter are mutually
# exclusive.
#listen_ipv6=YES
#
# Allow anonymous FTP? (Disabled by default)
anonymous_enable=yes
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
#write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# If enabled, vsftpd will display directory listings with the time
# in your local time zone. The default is to display GMT. The
# times returned by the MDTM FTP command are also affected by this
# option.
use_localtime=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
xferlog_file=
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may restrict local users to their home directories. See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
#chroot_local_user=YES
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_local_user=YES
chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# Debian customization
#
# Some of vsftpd's settings don't fit the Debian filesystem layout by
# default. These settings are more Debian-friendly.
#
# This option should be the name of a directory which is empty. Also, the
# directory should not be writable by the ftp user. This directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access.
secure_chroot_dir=/var/run/vsftpd/empty
#
# This string is the name of the PAM service vsftpd will use.
pam_service_name=vsftpd
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/private/vsftpd.pem
local_umask=
#max_per_ip=
chroot_local_user=YES
chroot_local_user=YES
write_enable=NO
哪里有错误呢?

2011/5/28 14:42 | 0a846 ec37f 3262f c76aa
應用擴展 工具箱
訪客
回覆: 无法启动vsftp(ubuntu11.04)
Anon:訪客
我的电脑上面同时安装了webmin
我在浏览器中输入
https://192.168.1.100:10000/
会跳出一个窗口,我输入帐号,密码,可以登录
为何
ftp://192.168.1.100
不能进行连接?

2011/5/28 14:52 | 0a846 ec37f 3262f c76aa
應用擴展 工具箱
回覆: 无法启动vsftp(ubuntu11.04)

註冊日期:
2009/12/6 10:32
所屬群組:
已註冊使用者
等級: 71
HP : 1053 / 1756
MP : 4456 / 70809
EXP: 24
離線
ftp server 這一臺
防火牆 一般要開放 20 與 21 端口
21 用來傳輸指令
20 用來傳輸資料
這兩個 ports 也可以更改

vsftpd.conf - config file for vsftpd
詳細看每個 設定項目 的意義

ftp client 這一臺
也是 要設定兩個 ports
用來 傳輸指令 的 port 要小於 1024
用來 傳輸資料 的 port 最好大於 50000
防火牆要開放上面的兩個 ports

filezilla 是 很好用的 ftp client

2011/5/28 15:29
應用擴展 工具箱
訪客
回覆: 无法启动vsftp(ubuntu11.04)
Anon:訪客
我现在用另外一台没有安装防火墙软件的机器测试,同样的配置,一切ok.
应该是防火墙的问题,端口的问题.
1.我关闭防火墙
不行
2.我使用命令行打开端口
sudo iptables -A INPUT -p tcp --dport 20 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 20 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 21 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 21 -j ACCEPT
再次尝试,
ftp://192.168.1.100,不行
$ ftp 192.168.1.100
ftp: connect: Connection refused
ftp>
也不行

还是不行,问题出在哪里?

2011/5/28 17:58 | 0a846 ec37f 3262f c76aa
應用擴展 工具箱
回覆: 无法启动vsftp(ubuntu11.04)

註冊日期:
2009/12/6 10:32
所屬群組:
已註冊使用者
等級: 71
HP : 1053 / 1756
MP : 4456 / 70809
EXP: 24
離線
2.我使用命令行打开端口
sudo iptables -A INPUT -p tcp --dport 20 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 20 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 21 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 21 -j ACCEPT

你這個指令是在 server 還是 client 執行的 ?

2011/5/28 20:45
應用擴展 工具箱
訪客
回覆: 无法启动vsftp(ubuntu11.04)
Anon:訪客
1.我的电脑防火墙在本机,这台机器即当服务器,有当客户端.
2.我的机器通过路由上网的,路由地址192.168.1.1(adsl+路由),A机器192.168.1.100,安装了一个防火墙firestarter,上面有vsftp,还没配置好;机器B192.168.1.101,没有安装防火墙,上面的vsftp配置好了.
我在机器A上,可以通过vsftp,连上B的设定文件夹(ftp://192.168.1.101);机器B上通过vsftp也可以连上它自身.
于是,我到朋友那里(相对我言是外部网络),在他的浏览器中输入
ftp://xx.yy.bb.cc (公网ip),没有反映.
现在有3个问题需要解决
1.机器A,如何配置好vsftp?
2.目前的状态下,我如何在外部网络,让朋友可以登录到我的机器B的vsftp设定目录?
3.如果机器A上面的vsftp配置好后,假定A的/var/ftp上面有moviea;机器B上面的/var/ftp有movieb,朋友通过什么方式,可以分别获得moviea,movieb?

2011/5/28 21:01 | 0a846 ec37f 3262f c76aa
應用擴展 工具箱
回覆: 无法启动vsftp(ubuntu11.04)

註冊日期:
2009/12/6 10:32
所屬群組:
已註冊使用者
等級: 71
HP : 1053 / 1756
MP : 4456 / 70809
EXP: 24
離線
我在机器A上,可以通过vsftp,连上B的设定文件夹(ftp://192.168.1.101);
机器B上通过vsftp也可以连上它自身.

你的描述 顯示你混淆了一個觀念
ftp 是一個 server-client 模式
vsftpd: lightweight, efficient FTP server written for security
是 server 端 常駐記憶體 程式

你一定要從 client 端的電腦 使用 client 端程式套件來與 server 溝通
ubuntu 並沒有名稱爲 vsftp 的客戶端套件 不知你這裏的 vsftp 是從哪裏來 ?

我在上面 #6 已向你推薦 filezilla client 是一個好用的 ftp client 端軟體
所以你可以 下載 filezilla client 端程式 安裝在你的 client 端電腦內
從你的 client 端電腦 執行 filezilla client 程式 來與 server 端的 vsftpd 程式 連綫溝通

換句話說 安裝有 filezilla client 那臺電腦 才叫 ftp client

類似 filezilla client 功能的 client 端程式 可以在 ubuntu client 端使用的 還很多
你先 熟悉 filezilla client 再來研究 其它 client 端的程式

2011/5/28 21:30
應用擴展 工具箱

(1) 2 »

 [無發表權] 請登錄或者註冊


可以查看帖子.
不可發帖.
不可回覆.
不可編輯自己的帖子.
不可刪除自己的帖子.
不可發起投票調查.
不可在投票調查中投票.
不可上傳附件.
不可不經審核直接發帖.