2012年5月11日金曜日

vsftpd Automatic startup 553 Could not create file


vsftpd Automatic startup 553 Could not create file



             /etc/vsftpd/vsftpd.conf
            default のままで、upload download は、出来る。

            in default configuration, it can upload and download.


            ftpコマンド (Linux CUI client) を使うと、
                       「 553 Could not create file.」Msg が出る。

            if you use ftp_command (Linux CUI client),
               then Message appears  " 553 Could not create file."


            lftpコマンド (Linux CUI client) を使うと、問題なし。
         
            if you use lftp_command (Linux CUI client),
               then OK, no problem.

         
            初めてサーバー構築する者にとっては、
            ftp client を使う事が適当なのか否かさえ
            判断出来ず長時間費やしてしまう。
         
            For those who build server for the first time,
            it can not be determined,
            even whether it is appropriate to use the ftp client or not.
            and spent a lot of time.


            しかし、一方、一筋縄で行かず、いろいろ迷ってみる事は、
            周辺技術の習得にも成り、良い事かも知れません。
         
            However, the other hand,            
            it may be a good thing
            not to go in the tricky, and look lost,
            because you Will also learn many Related technologies.
           
           
SetUp FTP server (vsftpd@fc13.Linux)

1 目的 The purpose
        WindowsMe から、data をLinux に転送し、
Linuxにて、email にて送信する為。
        samba でも、出来るが、
FTP の方が、大掛かりに成らずに出来る。

The purpose is to transfer the data
from WindowsMe to Linux.
it can be by samba,
but it is easy to build by FTP. 


2 install vsFTPd by package manager.

3 vsFTPd configuration

        # 1: default のままでも、upload download は、出来る。

        #    in default configuration, it can upload download.


        # 2: ascii転送出来る様に

        #       can be transferred by ascii code
           
        ascii_upload_enable=YES
        ascii_download_enable=YES

        # Shift_JIS から、UTF-8 に、自動で encoding してくれる。


        # 3: recognise asynchronous ABORT requests
        async_abor_enable=YES

       
        # 4: uploaded by anonymous
        chown_uploads=YES
        chown_username=nobody


        # 5: タイムスタンプ時間を日本時間に合わせる

        #     use localtime
             
        use_localtime=YES


        # 6: log managemant

        xferlog_enable=YES
        xferlog_file=/var/log/vsftpd/xferlog
        xferlog_std_format=NO
        log_ftp_protocol=YES
        vsftpd_log_file=/var/log/vsftpd/vsftpd.log
        syslog_enable=NO
        dual_log_enable=YES


        # 7; Use passive mode

        pasv_promiscuous=YES
        #Range of ports when using passive mode
        pasv_min_port=50000
        pasv_max_port=50030


        # 8: access is limited to only within a Lan.

        #     wanにも、広げるのならば、ssh scp を使うべし。

        #     if it spread to wan, use ssh or scp.

        /etc/hosts.allow   
        vsftpd : 192.168.0. 127.0.0.1

        /etc/hosts.deny
        vsftpd : ALL

4 vsFTPd operation@root

        # /sbin/service vsftpd start
        # /sbin/service vsftpd stop
        # /sbin/service vsftpd restart
        # /sbin/service vsftpd status

        # chkconfig --list vsftpd
        # chkconfig vsftpd off
        # chkconfig vsftpd on



5 psコマンドでvsftpdのプロセスを確認、

   confirm the process of vsftpd by ps command.

        # ps -ef |grep vsftpd


6 select FTP client

it is easy to Upload and Download

        IExplorer ( each Windows version )
        lftp (Linux CUI client)
        gFTP (Linux GUI client)
        Kasablanca (Linux GUI client)

     
it is delicate to Upload and Download

        ftp (Linux CUI client // 553 Could not create file. Msg appears)
        Firefox (except adon soft)
        google Chrome
        (able to Download, but can not Upload )


7 directory inside FTPserver

                         FTP directory = "/home/*userDirectory*"
        anonymousFTP directory = "/var/ftp"
                 download directory = "/var/ftp/pub"
                     upload directory = "/var/ftp/uploads"


8 FTP client operation@each_User

        ftp://UserID:pw@FTPaddr/ ( IExplorer etc )

        lftp> open user
        lftp> ls cd pwd
         ftp> type ascii type binary
        lftp> get mget
        lftp> put mput
        lftp> quit exit bye


9: end