상태: 211.111.111.188:21에 연결…
상태: 연결 수립, 환영 메시지를 기다림…
응답: 220 (vsFTPd 2.3.5)
명령: USER root
응답: 331 Please specify the password.
명령: PASS *******
응답: 530 Login incorrect.
오류: 치명적 오류
오류: 서버에 연결하지 못함
sudo apt-get remove --purge vsftpd
후 다시 설치
sudo apt-get install vsftpd
# ——————————————————————————
# SETUP FTP USERS ————————————————————–
# ——————————————————————————
# create the ftp users and lock them to the website directories
useradd -d /srv/www/[website/appname] -m [ftp user name]
# set the ftp account passwords
passwd [ftp user name]
# add the ftp users to the www-data user/group
adduser [ftp user name] www-data
# BUG FIX: 500 OOPS: vsftpd: refusing to run with writable root inside chroot()
sudo add-apt-repository ppa:thefrontiergroup/vsftpd
sudo apt-get update
sudo apt-get install vsftpd
# if sudo add-apt-repository command not found ubuntu
sudo apt-get install software-properties-common python-software-properties
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
root@auctionpro:/data# sudo add-apt-repository ppa:thefrontiergroup/vsftpd vsftpd 2.3.5 with the allow_writeable_chroot feature backported from vsftpd 3. 더 많은 정보: https://launchpad.net/~thefrontiergroup/+archive/ubuntu/vsftpd 계속하려면 [엔터] 키를 누르시고 추가를 취소하려면 컨트롤+C 키를 눌러주십시오 gpg: keyring `/tmp/tmp5qt3klpc/secring.gpg' created gpg: keyring `/tmp/tmp5qt3klpc/pubring.gpg' created gpg: requesting key C855587C from hkp server keyserver.ubuntu.com gpg: /tmp/tmp5qt3klpc/trustdb.gpg: trustdb created gpg: key C855587C: public key "Launchpad PPA for The Frontier Group" imported gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) OK |
# Edit the vsftpd.conf and append this setting to the end of the file to keep users’ jailed!
nano /etc/vsftpd.conf
# add all of the text between the starting [[ and ending ]]
# Keep non-chroot listed users jailed
allow_writeable_chroot=YES
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# 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 #Add port_enable=YES pasv_enable=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=NO # # 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 # #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 #userlist_deny=NO #userlist_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 # # 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. #2013-09-29 vsftpd->ftp pam_service_name=vsftpd # Show hidden files and the "." and ".." folders. # Useful to not write over hidden files: force_dot_files=YES # Hide the info about the owner (user and group) of the files. hide_ids=YES # Connection limit for each IP: max_per_ip=2 # Maximum number of clients: max_clients=10 ## end # # 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 # This option specifies the location of the RSA key to use for SSL # encrypted connections. #rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key # Enable (only) guests. #guest_enable=YES # This is not needed, it's the default. Just here for clarity. #guest_username=ftp # Where the guests (virtual) usernames are set. #user_config_dir=/etc/vsftpd/vusers allow_writeable_chroot=YES 삭제 |
# restart the service for changes to take effect
sudo service vsftpd restart
#test ftp via secondary terminal window:
ftp [ftp user name]@[server ipaddress] [ftp port]
추가
1. Go to /etc/apt and post exactly what you have there. In terminal:
1 2 3 |
cd /etc/apt |
1 2 3 |
ls -a |
2. Make sure, if you do have a sources.list, back it up:
1 2 3 |
sudo cp sources.list sources.list.bak |
This should return an error if you truly don’t have a sources.list.
3. If this returns an error, try using one of the backup or savefiles. Open each to see if one (or both) match the distribution you are using (Hardy or Intrepid probably), then:
1 2 3 |
sudo cp sources.list.save sources.list |
or
1 2 3 |
sudo cp sources.list_backup sources.list |
depending on which one is the one you wish/need to use.
If you have any problems or questions during this process, please, post back here before continuing.
4. When you are satisfied your sources.list is restored:
1 2 3 |
sudo apt-get update |
Good luck! Keep us updated.
추가
~# sudo apt-get remove vsftpd
패키지 목록을 읽는 중입니다… 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다… 완료
다음 패키지를 지울 것입니다:
vsftpd
0개 업그레이드, 0개 새로 설치, 1개 제거 및 61개 업그레이드 안 함.
1개를 완전히 설치하지 못했거나 지움.
이 작업 후 361 k바이트의 디스크 공간이 비워집니다.
계속 하시겠습니까? [Y/n] y
(데이터베이스 읽는중 …현재 99720개의 파일과 디렉터리가 설치되어 있습니다.)
Removing vsftpd (3.0.2-1ubuntu2.14.04.1) …
invoke-rc.d: dangling symlink: /etc/rc2.d/S20vsftpd
dpkg: error processing package vsftpd (–remove):
설치한 pre-removal 스크립트 하위 프로세스가 오류 102번을 리턴했습니다
invoke-rc.d: dangling symlink: /etc/rc2.d/S20vsftpd
dpkg: 정리하는 중에 오류가 발생했습니다:
설치한 post-installation 스크립트 하위 프로세스가 오류 102번을 리턴했습니다
처리하는데 오류가 발생했습니다:
vsftpd
E: Sub-process /usr/bin/dpkg returned an error code (1)
Seems like Rudi (a colleague) helped me solve the problem, here are the steps.
– got inside this folder by: $ cd /etc/rc2.d/
– and checked all the links, particularly to see the link between K09samba and samba by: $ ls -al (this is what we found S20vsftpd -> /vsftpd)
– then removed K09samba by: $ sudo rm S20vsftpd
– then removed samba by: $ sudo apt-get remove -f vsftpd
– we then did this: sudo apt-get -f install (might not do anything)
– the install samba: $sudo apt-get install vsftpd
– and created the soft link: $ sudo ln -s ../init.d/vsftpd S20vsftpd
Then everything worked. We followed the same procedure in rc3.d strating changing the directory.
Edit/Delete Message
I had the same problem here but doing:
1 2 3 |
sudo apt-get remove --purge vsftpd |
and then reinstalling sorted it out. Must have been something in my vsftpd conf.
p.s. builtbylane the process shown in your comment is the “grep” command itself not the vsftpd daemon.