【さくらVPSで運用 CentOs5.5】VSFTP編
※サーバー運用の素人の個人メモなので、あんまり参考にしない方がいいかも。
設定ファイル
# /etc/vsftpd/vsftpd.conf
設定する
設定ファイルを開く
# vi /etc/vsftpd/vsftpd.conf
# Example config file /etc/vsftpd/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.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
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
#
# The target log file can be vsftpd_log_file or xferlog_file.
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# The name of log file when xferlog_enable=YES and xferlog_std_format=YES
# WARNING - changing this filename affects /etc/logrotate.d/vsftpd.log
#xferlog_file=/var/log/xferlog
#
# Switches between logging into vsftpd_log_file and xferlog_file files.
# NO writes to vsftpd_log_file, YES to xferlog_file
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# 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
# Example config file /etc/vsftpd/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.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
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
#
# The target log file can be vsftpd_log_file or xferlog_file.
# This depends on setting xferlog_std_format parameter
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
#
# The name of log file when xferlog_enable=YES and xferlog_std_format=YES
# WARNING - changing this filename affects /etc/logrotate.d/vsftpd.log
#xferlog_file=/var/log/xferlog
#
# Switches between logging into vsftpd_log_file and xferlog_file files.
# NO writes to vsftpd_log_file, YES to xferlog_file
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# 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 a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# 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_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 ←ディレクトリ単位の操作を許可。
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd whith two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YESpam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES#日本時間にする
use_localtime=YES
chroot_list_enable=NO
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list ←ここに上に行けるユーザー名を書くと行けるchroot_list_enable=YES にするとリストが逆の意味になる。
必要なら足す。
設定が終わったら起動と自動起動の設定
# service vsftpd start
# chkconfig vsftpd on
追加分(FTPのポートが開いてればいらない)
コマンドリスト
起動コマンド
# /etc/init.d/vsftpd start
or
# service vsftpd start停止コマンド
# /etc/init.d/vsftpd stop
or
# service vsftpd stop自動起動コマンド
# chkconfig vsftpd on
【さくらVPSで運用 CentOs5.5】初期設定編
※サーバー運用の素人の個人メモなので、あんまり参考にしない方がいいかも。
rootのパスワードを変更
# passwd
Changing password for user root.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
ユーザー作成
# useradd ユーザー名
# passwdv パスワード
Changing password for user ユーザー名.
New UNIX password:
rootでのログインを禁止
#PermitRootLogin yes
PermitRootLogin no ←ルートでのログインを禁止
システムアップデート
yum update
ユーザーにsudoコマンドを使えるように設定
# yum list installed | grep sudo
# usermod -G wheel ユーザー名# id ユーザー名
uid=500(ユーザー名) gid=500(ユーザー名) groups=500(ユーザー名),10(wheel) こうなってればおk# visudo
%wheel ALL=(ALL) ALL ←コメントアウトを外して有効化
sudoコマンドのパスを通す
vi /home/ユーザー名/.bash_profile以下を追記する
PATH=$PATH:/sbin
PATH=$PATH:/usr/sbin
PATH=$PATH:/usr/local/sbin再ログインで設定が反映する
SSHがデフォルトの22番ポートだと危険なので、sshのポート番号を変更する。
sudo vi /etc/ssh/sshd_config
Port 10022 を追加。ポート番号は任意だが1万番台は他で使っていないので10022にした。
iptables が未設定の状態から SSH、HTTP、FTP、MySQL だけに限定してポート解放し、後は利用しないようにする。
SSH については変更したポート10022番、HTTP は 80 番、FTP は 20 と 21 番、MySQL はデフォルトの 3306 番を使用する。
sudo vi /etc/sysconfig/iptables ------------------------------------------------------------------------------------------ *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] :RH-Firewall-1-INPUT - [0:0] -A INPUT -j RH-Firewall-1-INPUT -A FORWARD -j RH-Firewall-1-INPUT -A RH-Firewall-1-INPUT -i lo -j ACCEPT -A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT -A RH-Firewall-1-INPUT -p 50 -j ACCEPT -A RH-Firewall-1-INPUT -p 51 -j ACCEPT -A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT -A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT -A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # SSH, HTTP, FTP1, FTP2, MySQL -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 10022 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 20 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited COMMIT ------------------------------------------------------------------------------------------ sudo /etc/rc.d/init.d/iptables restart iptablesを再起動して設定を反映 sudo iptables -L 設定が反映されているか確認
とりあえずはここまで。
Googleパーソンファインダーでの検索のコツ
パーソンファインダー (安否情報): 日本(携帯対応 / Mobile OK)
既にご存じの方も多いかと思いますが、Googleが今回の東日本大震災において安否の確認が取れていない
方へ向けて名前から安否を確認できる「パーソンファインダー」と言う特設サイトを設けています。
簡単に使い方を説明します。
人を探す場合は「人を探している」をクリック
後は、赤枠の所へ人名を入力するだけなのですがここでひとつコツがあります。
正確な人名を漢字で入力すると、情報が少ないのですが
人名を全てひら仮名もしくはアルファベットで入力する
と表示される情報量がぐんと上がります。
これは、情報提供者が正確な漢字を把握しているとは限らないからです。
実際に、私もこの方法で友人の親戚を見つけることができました。
地味なことですが、意外と気づかないことですので記事にしました。
是非、試してみて下さい。
以下は、蛇足ですがパーソンファインダーの名簿がどの様に作られているのかを解説します。
- 生存者名簿
https://picasaweb.google.com/116505943227607394790/2011_03_14_1300_name_list#
ここに、避難所などで貼られている生存者リストを画像でアップロードされいます。
この画像にある名前を、有志がテキスト化→パーソンファインダーへ名前を登録と言う流れになっています。
- これのアップロードとテキスト化のルール
Google Japan Blog: 被災地の皆さまへ、避難所名簿共有サービス開始のお知らせ
ここに画像をテキスト化するルールが記載されています。
- その他の安否確認できるサイトリストの一覧
WEB上でドローイングできるサービス「cacoo」がPDFに対応したそうです
「cacoo」はブラウザを使用して、直観的にWEBサイトのワイヤーフレームを作成したり
様々なドローイングをリアルタイムに複数人で編集できる非常に優れたサービスです。
距離的に離れていて、一緒にWEBサービスを作成していきたい人にはうってつけのサービスではないでしょうか。
【参考】申し分なし! Web版ドローツール『Cacoo』の使い心地 - リアルタイムコラボにもおすすめ!
http://journal.mycom.co.jp/articles/2009/11/10/cacoo/index.html
そんな「cacoo」がPDF出力に対応をしたそうです。
PDF出力を利用するにはプラスプラン(月額480円)に申し込む必要があるとのこと。
以下はバージョンアップ内容の引用です。
1.図をPDF型式で出力
- -
2009年にCacooのベータ版を公開して以来、皆さまからの要望が大変多かったこの機能、ついにCacooで対応しました。
PDF出力に対応したことで、Cacooの持つ可能性が更に広がりました。
例えば、Cacooで作成した図を取引先との打ち合わせの資料として使うときなど、PDFファイルが最適なケースがあるでしょう。
その他、作成したPDFファイルを、弊社で提供しておりますプロジェクト管理ツールBacklogで管理して、プロジェクトメンバー間で効率的に情報共有する、なんていう使い方も可能です。
(Backlogに関して、詳しくは http://bit.ly/hCaqsS からどうぞ)以下でCacooから出力したPDFのサンプルをご覧になれますので、よろしければご覧ください。
- http://bit.ly/h8nYwd
- http://bit.ly/fTVAmtPDF出力する際には、用紙サイズ、向き、および出力対象のシートを指定できるので、目的に応じて細やかなカスタマイズが可能です。
また、今回あわせてPS型式での出力にも対応してしたので、用途に応じた使い分けができるようになっています。なお、PDFおよびPS出力機能はプラスプランのユーザーのみご利用できます。
フリープランの方は、この機会にプラスプランへのグレードアップを検討してみてはいかがでしょうか。2.フリーハンドで線を描く
- -
色や太さを指定して、フリーハンドで線を描けるようになりました。
例えば、作成中の図にフリーハンドでちょっとしたアクセントをつけてみる等、手描きだからこそできる表現があるはずです。
まずは、フリーハンドの使い心地を試してみて下さい。
3.その他
- -
- 対応言語にトルコ語を追加しました。
引き続き翻訳者募集中ですので、興味がある方は、http://blog.cacoo.com/ja/2010/09/01/cacoo-translator/ からどうぞ。- 図形を追加または移動する時など、キャンバスの端にカーソルを移動したら自動でスクロールするようになりした。
キャンバスのサイズも自動で拡張するようになっています。- MacでChromeを利用した場合の日本語入力環境を、更に改善しました。
シート名や、図のタイトルに日本語を入力できるようになっています。
私も無料プランで使用していますが、これタダでいいんですか?
と言いたくなるくらい素晴らしい使い勝手です。
まだ、試したことのない方は是非お試しを。
「cacoo」へはこちらから
http://cacoo.com
【動画】見ているとニヤニヤしてしまう動物達の動画集
時として動物は、予想もしない行動をしますね。
最近お気に入りの面白い動物達の動画を集めてみました。
- とんでもないカンガルー
池に佇む少年に背後から忍び寄るカンガルー・・
- ニャルガクルガ
モンスターハンターというゲームに出てくるナルガクルガというモンスターに動きがそっくりです。
- ねこじゃらしを振り回すネコ
果たしてねこじゃらしに遊ばれずに遊んでしまうネコの結末は。
- 天才ビリヤード犬
おれよりうまいぞw
- 小熊に弄ばれるネコの反撃
すごすごと小屋に帰っていく小熊がかわいすぎます。
どれもかわいい(´ー`)y-~~