티스토리 뷰
안녕하세요. 09LABS 입니다.
오늘은 제가 자주 사용하는 FTP 서버 설정을 간단하게 하는 방법에 대해 알아보겠습니다.
먼저 FTP 서버를 설치해야 하며, 우분투, 라즈베리파이 등에 사용할 수 있는 FTP 서버는 proftpd, vsftpd, pure-ftp 등이 있습니다.
제가 가장 많이 사용하는 FTP 서버는 vsftpd입니다. 설치도 간편하고 설정도 쉽기 때문이죠.
1
2
3
4
5
|
sudo apt-get -y install vsftpd
vi /etc/vsftpd.conf
service vsftpd restart
|
cs |
1번 라인과 같이 터미널에 입력하면 vsftpd를 설치할 수 있습니다.
FTP 서버를 설치한 뒤 바로 사용할 수 있지만 설정을 변경하지 않으면 파일을 업로드 하는 것이 불가능합니다.
따라서 읽기 / 쓰기 권한을 모두 가지고 있는 디렉토리 생성 또는 권한 변경이 필요하며, vsftpd 설정을 필요로 합니다.
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
|
# 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=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
|
cs |
/etc/vsftpd.conf 파일을 열어서 위와 같이 변경을 해줍니다. #으로 주석처리 된 부분은 해제를 하면 됩니다.
설정을 변경한 뒤 'service vsftpd restart' 명령어를 터미널에 입력해서 프로세스를 재시작해줍니다.
1
2
|
mkdir test
chmod a+rw test
|
cs |
이제 FTP서버가 정상적으로 작동하는지 확인해봐야 합니다.
먼저 test 라는 디렉토리 생성 후 권한을 모든 사용자에게 rw를 부여합니다.
설정 완료 후 Filezilla 와 같은 FTP 클라이언트로 접속 확인 후 파일을 전송해보면 됩니다.
끗-
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- IOT
- 쏘카
- 오픈소스 하드웨어
- DIY
- 라즈베리파이
- 코딩테스트
- C++
- 아두이노
- fusion360
- 3d프린터
- 프린터
- Fusion 360
- 프로젝트
- 3D 프린터
- ESP-IDF
- 해커랭크
- 오픈소스
- ESP
- Arduino
- 자작
- 3D Printer
- SQLITE3
- C언어
- esp32
- 하드웨어
- 설계
- 퓨전360
- Hypercube
- 리눅스
- 3D
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함