マックの趣味

vsftp

会社がFTPサーバを立ててくれないので、私のサーバを皆が使用します。
しかし、ここ最近、トラフィックの影響で私の環境に影響が出てくるようになりました。そこで、帯域制限をしようと探したところ、vsftpd が帯域制限をしてくれるようなので、インストールしました。inetd.conf のftp の項をコメントアウトして、inetd をHUPします。あとは、rc.d/vsftpd.sh をスタートさせて完了です。sslを追加しました。
運営しているHPが見れないとの連絡で見えないファイルのパーミッションを見ると、あれ、リードにフラグないじゃん。ってことで調べてみるとlocal user umask が Default: 077とのことなので、umask の設定を追加しました。

参考サイトは
http://freebsd.server-manual.com/7/vsftpd.html
です。

ちなみに、今のところ、vsftpd.conf は

# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO

# Activate logging of uploads/downloads.
xferlog_enable=YES

# 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
xferlog_std_format=NO

# 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 blah FTP service.

# 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().
chroot_local_user=YES
chroot_list_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

#ローカルユーザーアクセス許可
local_enable=YES
use_localtime=YES
#PASVモードのデータ転送ポートの上限と下限
pasv_min_port=60000
pasv_max_port=60030
#ssl 接続を許可
ssl_enable=YES
#ssl のファイルを指定
rsa_cert_file=/usr/local/etc/apache22/ssl/server.pem
rsa_private_key_file=/usr/local/etc/apache22/ssl/key.pem
#ssl でない場合も接続許可
force_local_logins_ssl=NO
force_local_data_ssl=NO
listen=YES
background=YES
secure_chroot_dir=/var/spool/empty
#帯域制限
anon_max_rate=50000
local_max_rate=500000
trans_chunk_size=500000
#ローカルユーザーのumask
local_umask=022
#書き込み許可
write_enable=YES
ls_recurse_enable=YES
#hosts.allow による制限許可
tcp_wrappers=YES

ランキングに参加中、クリックをお願いします。

名前:
コメント:

※文字化け等の原因になりますので顔文字の投稿はお控えください。

コメント利用規約に同意の上コメント投稿を行ってください。

 

  • Xでシェアする
  • Facebookでシェアする
  • はてなブックマークに追加する
  • LINEでシェアする

最新の画像もっと見る

最近の「FreeBSD」カテゴリーもっと見る

最近の記事
バックナンバー
人気記事