楼上的日志中没有新的上传信息。
另问题无非是88楼的两个。先完全禁用 ufw 试试。
代码: 全选
sudo ufw disable
UFW 配置 参考
https://wiki.ubuntu.com/UncomplicatedFirewall
https://help.ubuntu.com/community/UFW
https://wiki.archlinux.org/index.php/Un ... d_Firewall
代码: 全选
sudo ufw disable
代码: 全选
Mon Jan 25 13:32:16 2016 [pid 2569] FTP response: Client "::ffff:192.168.1.2", "220 Welcome to Michael's FTP service."
Mon Jan 25 13:32:19 2016 [pid 2569] FTP command: Client "::ffff:192.168.1.2", "USER michael"
Mon Jan 25 13:32:19 2016 [pid 2569] [michael] FTP response: Client "::ffff:192.168.1.2", "331 Please specify the password."
Mon Jan 25 13:32:21 2016 [pid 2569] [michael] FTP command: Client "::ffff:192.168.1.2", "PASS <password>"
Mon Jan 25 13:32:21 2016 [pid 2568] [michael] OK LOGIN: Client "::ffff:192.168.1.2"
Mon Jan 25 13:32:21 2016 [pid 2572] [michael] FTP response: Client "::ffff:192.168.1.2", "230 Login successful."
Mon Jan 25 13:32:22 2016 [pid 2572] [michael] FTP command: Client "::ffff:192.168.1.2", "PORT 192,168,1,2,199,156"
Mon Jan 25 13:32:22 2016 [pid 2572] [michael] FTP response: Client "::ffff:192.168.1.2", "200 PORT command successful. Consider using PASV."
Mon Jan 25 13:32:22 2016 [pid 2572] [michael] FTP command: Client "::ffff:192.168.1.2", "NLST"
Mon Jan 25 13:32:22 2016 [pid 2572] [michael] FTP response: Client "::ffff:192.168.1.2", "150 Here comes the directory listing."
Mon Jan 25 13:32:22 2016 [pid 2572] [michael] FTP response: Client "::ffff:192.168.1.2", "226 Directory send OK."
Mon Jan 25 13:32:32 2016 [pid 2572] [michael] FTP command: Client "::ffff:192.168.1.2", "PORT 192,168,1,2,199,171"
Mon Jan 25 13:32:32 2016 [pid 2572] [michael] FTP response: Client "::ffff:192.168.1.2", "200 PORT command successful. Consider using PASV."
Mon Jan 25 13:32:32 2016 [pid 2572] [michael] FTP command: Client "::ffff:192.168.1.2", "STOR index2.html"
Mon Jan 25 13:32:32 2016 [pid 2572] [michael] FTP response: Client "::ffff:192.168.1.2", "553 Could not create file."
Mon Jan 25 13:32:32 2016 1 ::ffff:192.168.1.2 0 /index2.html a _ i r michael ftp 0 * i
Mon Jan 25 13:32:32 2016 [pid 2572] [michael] FAIL UPLOAD: Client "::ffff:192.168.1.2", "/index2.html", 0.00Kbyte/sec
代码: 全选
增加一个ftpgroup用户组
sudo groupadd ftpgroup
增加用户ftpuser并设置其目录为/home/montana/www/ftpuser
sudo useradd -g ftpgroup -d /home/montana/www/ftpuser -M ftpuser
代码: 全选
# 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=NO
#
# This directive enables listening on IPv6 sockets. By default, listening
# on the IPv6 "any" address (::) will accept connections from both IPv6
# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
# sockets. If you want that (perhaps because you want to listen on specific
# addresses) then you must run two copies of vsftpd with two configuration
# files.
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=/var/log/vsftpd.log
#
# 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=NO
#
# 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 Michael's 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().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
#chroot_local_user=YES
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd.chroot_list
# vsftpd.chroot_list should include the list to be chrooted.
# 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
#
# Customization
#
# Some of vsftpd's settings don't fit the filesystem layout by
# default.
#
# 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=ftp
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
ssl_enable=NO
#
# Uncomment this to indicate that vsftpd use a utf8 filesystem.
#utf8_filesystem=YES
#根目录位置
local_root=/home/montana/ftpuser
pasv_promiscuous=YES
dual_log_enable=YES
log_ftp_protocol=YES
allow_writeable_chroot=YES
貌似 vsftpd 默认本地用户 umask 为 077,这样其它用户不可读?montana 写了:比如index.html文件,在服务器上用浏览器却无法打开,图标显示加了一把小锁。
/etc/vsftpd.conf 写了:# Default umask for local users is 077. You may wish to change this to 022
代码: 全选
local_umask=022
代码: 全选
2. 增加一个ftpgroup用户组
sudo groupadd ftpgroup
3. 增加用户ftpuser并设置其目录为/home/montana/ftpuser/www(可以修改,但是必须创建该文件夹)
sudo useradd -g ftpgroup -d /home/montana/ftpuser/www -M ftpuser
不必重来,这样就很好。新建系统用户专门用于 ftp。montana 写了: 这两步不是添加了一个ftpuser的ftp登录账号,貌似添加了一个登录系统的账号。方向似乎弄错了,重来!
好主意,这样不会弄混了。vickycq 写了:不必重来,这样就很好。新建系统用户专门用于 ftp。montana 写了: 这两步不是添加了一个ftpuser的ftp登录账号,貌似添加了一个登录系统的账号。方向似乎弄错了,重来!
代码: 全选
montana@L440:~$ ps aux | grep apache
root 1349 0.0 0.6 278512 24236 ? Ss 08:40 0:00 /usr/sbin/apache2 -k start
www-data 1508 0.0 0.5 289728 21124 ? S 08:41 0:00 /usr/sbin/apache2 -k start
www-data 1509 0.0 0.2 278584 8024 ? S 08:41 0:00 /usr/sbin/apache2 -k start
www-data 1510 0.0 0.5 289160 19244 ? S 08:41 0:00 /usr/sbin/apache2 -k start
www-data 1511 0.0 0.4 288588 18012 ? S 08:41 0:00 /usr/sbin/apache2 -k start
www-data 1512 0.0 0.4 288608 18216 ? S 08:41 0:00 /usr/sbin/apache2 -k start
www-data 2463 0.0 0.2 278656 9836 ? S 09:17 0:00 /usr/sbin/apache2 -k start
www-data 2465 0.0 0.2 278536 8028 ? S 09:17 0:00 /usr/sbin/apache2 -k start
www-data 2466 0.0 0.2 278536 8028 ? S 09:17 0:00 /usr/sbin/apache2 -k start
www-data 2469 0.0 0.2 278536 8028 ? S 09:17 0:00 /usr/sbin/apache2 -k start
www-data 2470 0.0 0.2 278536 8028 ? S 09:17 0:00 /usr/sbin/apache2 -k start
montana 2547 0.0 0.0 16448 2468 pts/1 S+ 09:23 0:00 grep --color=auto apache
1. VMware Workstation 12 Player Free for Personal Use 沒有 30天 試用期限似乎vmware workstation只有30天试用版,virtual box设置起来还比较麻烦,似乎只有32位的,我的64位ubuntu上无法安装。
代码: 全选
montana@L440:~/Downloads$ sudo dpkg -i virtualbox-5.0_5.0.14-105127~Ubuntu~wily_amd64.deb
[sudo] password for montana:
Selecting previously unselected package virtualbox-5.0.
(Reading database ... 260442 files and directories currently installed.)
Preparing to unpack virtualbox-5.0_5.0.14-105127~Ubuntu~wily_amd64.deb ...
Unpacking virtualbox-5.0 (5.0.14-105127~Ubuntu~wily) ...
dpkg: dependency problems prevent configuration of virtualbox-5.0:
virtualbox-5.0 depends on libvpx2 (>= 1.4.0); however:
Package libvpx2 is not installed.
dpkg: error processing package virtualbox-5.0 (--install):
dependency problems - leaving unconfigured
Processing triggers for systemd (228-4ubuntu1) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for shared-mime-info (1.5-2) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Processing triggers for gnome-menus (3.13.3-6ubuntu2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu3) ...
Processing triggers for bamfdaemon (0.5.2~bzr0+16.04.20151217-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...
Errors were encountered while processing:
virtualbox-5.0