파일 서버

대부분의 환경에서는 윈도우XP또는 7에서 리눅스 서버에 접속하여 파일을 전송하므로, 이에 대해 설명한다.

SFTP

SFTP지원 클라이이언트 설치

FileZilla_3.5.1_win32-setup.exe 를 다운로드 받아 설치한다.

아래 화면과 같이 싸이트관리자에서 접속할 서버정보를 추가하고 접속한다.

  1. (파일 -> 싸이트관리자) 실행

  2. 서버정보 입력

    호스트 : 접속할 서버주소

    포트 : 8022

    Protocol : SFTP

    로그인 유형 : 일반

    사용자 : 부여받은 계정

    비밀번호 :

  3. (연결) 선택하여 서버에 접속

SFTP만 되는 계정 생성

chrooted 환경 설정

Samba(CIFS)

Samba는 리눅스(유닉스)와 윈도우 운영체제간에 파일/프린터 공유를 가능하게 해주는 프로그램이다. 윈도우에서 공유폴더를 사용할때 쓰이는 SMB라는 프로코톨을 구현한 것이다.

이것을 통해 리눅스의 디렉토리를 공유할 수 있고, 윈도우의 공유폴더를 리눅스에서 연결하여 사용할 수 있게 된다.

서버 설치

yum install samba samba-common

리눅스서버에서 공유폴더 설정

/etc/samba/smb.conf

Client의 사용자 인증 없음

[global]
        workgroup = SORCERER 
        netbios name = sorcerer-pe
        server string = Sorcerer Server
        security = share
# Disable Print
        load printers = no
        cups options = raw
        printing = bsd
        printcap name = /dev/null
        disable spoolss = yes
# ACL
        interfaces = lo eth1 192.168.1.10/24
        hosts allow = 127. 192.168.1.11
# Log
        log file = /var/log/samba/%m.log
        max log size = 1000
# Performance tuning
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
        read raw = yes
        write raw = yes
        oplocks = yes
        max xmit = 65535
        getwd cache = yes

[homes]
        comment = Sorcerer Home Directories
        path = /home/sorcerer/data
        browseable = no
        writable = yes

Client의 사용자 인증

[global]
        workgroup = SORCERER 
        netbios name = sorcerer-pe
        server string = Sorcerer Server
        security = user
        passdb backend = tdbsam
# Disable Print
        load printers = no
        cups options = raw
        printing = bsd
        printcap name = /dev/null
        disable spoolss = yes
# ACL
        interfaces = lo eth1 192.168.1.10/24
        hosts allow = 127. 192.168.1.11
# Log
        log file = /var/log/samba/%m.log
        max log size = 1000
# Performance tuning
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
        read raw = yes
        write raw = yes
        oplocks = yes
        max xmit = 65535
        getwd cache = yes

[homes]
        comment = Sorcerer Home Directories
        path = /home/sorcerer/data
        browseable = no
        writable = yes
        valid users = sorcerer

계정 생성

adduser sorcerer
smbpasswd -a sorcerer

서버 재시작

/etc/init.d/smb restart

윈도우의 공유폴더를 연결(mount)하기

smbclient

mount

/etc/fstab