vsftpd で .から始まるファイルを表示させる
そういえば忘れてた。
vim /etc/vsftpd/vsftpd.conf
force_dot_files=YES
service vsftpd restart
そういえば忘れてた。
vim /etc/vsftpd/vsftpd.conf
force_dot_files=YES
service vsftpd restart
GitHub の educational account の申請通ってた(*´ω`*) .edu のメールアドレス無しでもいけた(*´ω`*)
— wktkさん (@wktk) 2月 4, 2012
.ac.jp とか .edu みたいなメールアドレスで https://github.com/edu から申請すれば、通常は $7/month かかる GitHub の Micro plan が無料で利用できる。
普通の @gmail.com のアドレスで試してみた。
https://github.com/edu の I’m a student. のところに次のように書いて送信した (うろ覚え)
例によって英語に自信ないけどとりあえず通じたからまあいいかと思う。
I am a student at *** high school in Tokyo, Japan.
I’d like a free micro plan for a project with my schoolmates.
I don’t have any .edu email address because my school doesn’t provide it for students but I can send you a copy of my student ID card if required.
1, 2 日後 GitHub からメールが返って来た。
From: Kami (GitHub Staff)
Subject: [Contact] Student account requestAwesome! We’ve upgraded you to a micro account, which will be free for the next two years. We don’t enforce collaboration limits, so any group projects you may encounter can be hosted via your account.
Spread the word — we love giving free Micro accounts to students! Send them to:
https://github.com/eduHave an Octotastic day!
Kami
@gmail.com のアドレスでも educational account 申請は通った。
echo -e "To: 宛先\nFrom: 送信元\nSubject: 件名\n"`whois ドメイン` | /usr/sbin/sendmail -t
yum install ruby だと 1.8.5 になるので
マルニカ。 CentOSに最新Rubyをインストール。 から
yum install -y gcc rdoc # if needed wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz tar zxvf ruby-1.9.3-p0.tar.gz cd ruby-1.9.3-p0 ./configure --prefix=/usr make && make install
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.15.tgz cd rubygems-1.8.15 ruby setup.rb
Google Apps を利用して、メールアドレスの @ マーク以前が何でもメールを受信できるようにする
普段使ってるメールボックスに全て転送するようにさせる
Domain settings -> General -> Language で「日本語」、
Domain settings -> General -> New Admin Control Panel Features で “Current Release (multiple languages)”
を選択する (2011/12/26 現在)
TXT -> 出力された文字列
MX (10) -> aspmx.l.google.com
MX (20) -> alt1.aspmx.l.google.com
MX (20) -> alt2.aspmx.l.google.com
ServersMan@VPS の「ホームページセット」の設定
OS は CentOS 5.6 。
# root パスワード変更 passwd # 作業用ユーザ作成 useradd -G wheel **** passwd **** # ウェブサイト用ユーザ useradd -g users user passwd user chmod 705 /home/user
作業用ユーザで SSH 再ログイン
vi /etc/ssh/sshd_config
Port ****
PermitRootLogin no
PubkeyAuthentication yes
/etc/init.d/sshd restart # su 設定 vi /etc/pam.d/su
auth required pam_wheel.so use_uid
visudo
%wheel ALL=(ALL) ALL
# 言語設定 vi /etc/sysconfig/i18n
LANG=”ja_JP.UTF-8″
# アップデート yum update # 不要 daemon の停止 chkconfig --list | grep "3:on" chkconfig ajaxterm off # Ajax ターミナル chkconfig gpm off chkconfig lm_sensors off chkconfig --level 0123456 lvm2-monitor off chkconfig iscsi off chkconfig iscsid off chkconfig serversman off # Serversman chkconfig smadmd off # Serversman chkconfig saslauthd off chkconfig --list | grep "3:on" # MySQL のインストール yum -y install mysql-server vi /etc/my.cnf
[mysqld] # 以下追記
default-character-set=utf8
character-set-server=utf8
skip-character-set-client-handshake
service mysqld start #(?) /usr/bin/mysqladmin -u root password 'new-password' chkconfig mysqld on mysql -p
select user,host,password from mysql.user; delete from mysql.user where password=''; show databases; drop database test; exit
# FTP (vsftpd) 設定 vi /etc/vsftpd/vsftpd.conf
anonymous_enable=NO
xferlog_file=/var/log/xferlog
ascii_upload_enable=YES
ascii_download_enable=YES
ls_recurse_enable=YES
chroot_list_enable=YES
chroot_local_user=YES # 追記
chroot_list_file=/etc/vsftpd/chroot_list# 以下追記する
use_localtime=YES
pasv_promiscuous=YES
pasv_min_port=4000
pasv_max_port=4029
ssl_enable=YES
force_local_logins_ssl=NO
force_local_data_ssl=NO
rsa_cert_file=/etc/pki/tls/certs/
cd /etc/pki/tls/certs/ make vsftpd.pem /etc/rc.d/init.d/vsftpd restart vi /etc/vsftpd/chroot_list # HTTPD (Apache) 設定 cd /etc/httpd/conf/ # (自己証明書の作成) openssl genrsa -aes128 1024 > server.key openssl req -new -key server.key > server.csr openssl x509 -in server.csr -days 365 -req -signkey server.key > server.crt openssl rsa -in server.key > server.key vi /etc/httpd/conf/httpd.conf
KeepAlive On
ServerAdmin admin@cppr.net
<Directory “/var/www/html”>
AllowOverride All
</Directory>
DirectoryIndex index.html index.htm index.php index.cgi index.pl
HostnameLookups On
#ScriptAlias /cgi-bin/ “/var/www/cgi-bin/”
#<Directory “/var/www/cgi-bin”>
#
#</Directory>
LanguagePriority /ja/ en ca cs da de el eo es et fr he hr it ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
AddHandler cgi-script .cgi .pl
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
# VirtualHost 設定 vi /etc/httpd/conf.d/vhost.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin admin@cppr.net
DocumentRoot /var/www/html
ServerName v-182-163-48-66.ub-freebit.net
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
# LWP のインストール yum install -y perl-libwww-perl # Postfix のインストール・設定 yum install postfix vi /etc/postfix/main.cf /etc/rc.d/init.d/postfix start chkconfig postfix on
見づらい……(´・ω・`)
以前に変更してから数ヶ月間 @wktk_ というユーザー名を使っていたけど、下の記事を見て @wktk を取得してみようと思いたった。
当時 wktk のドメインは持っていなかったし、登録していたメールアドレスも全く関係ないものだったけど、とりあえず Twitter のなりすまし報告フォーム から
「今私のユーザ名は @wktk_ だが、@wktk を使いたいと思っている。@wktk は 4 年以上放置されているので、出来るなら譲って貰えないか」
というふうな文を英語で書いて送ってみた。
送信して数分で自動返信の確認メールが来て、その約 2 日後にこんな返信が返って来た。
We can’t release the username you mentioned at the moment. We are working to release all inactive usernames, but the reported account does not satisfy the conditions for release. Please keep in mind that not all signs of account activity are publicly visible.
Twitter is transferring usernames of accounts that violate our Trademark Policy. For more information about Twitter’s Trademark Policy, please see:
http://support.twitter.com/
entries/18367 In general, adding numbers, underscores, or abbreviations can help you claim a great available username.
つまりダメだった。
せっかく (?) なので、ドメインを取って問い合わせし直してみることにした。
wktk.us のドメインを取得して、Google Apps でメールを送受信できるように設定して、適当な HP を作成。
Twitter 側では、登録しているメールアドレスを wktk@wktk.us に変更し、プロフィールの Web 欄を www.wktk.us に変更した。
そして Twitter のフォームから、下のように書いて送った。勿論メールアドレス欄は取得したドメインのもの (今回は wktk@wktk.us) を入力。
Hello, My handle is wktk and my website is http://www.wktk.us. Currently my username is @wktk_, but I would like to use @wktk. Because my visitors are sometimes confused, I want to make my username the same as my domain if possible. The user @wktk seems to have been inactive for more than four years. Can I change my username to @wktk? Thank you.
英語的に正しいのかは分からないけど、とりあえず通じたのでまあこれでいいんじゃないかと思う。
これを送ってから 1 週間と数時間が経ったころ、Twitter から返信があった。
We have now associated @wktk with the account you provided.
We appreciate your patience.
確認するとユーザー名が @wktk に変わっていた。成功。
多分、Twitter が @wktk (当時) に「アカウント使ってないけど、消しちゃうよ?」みたいな確認メールを送って、返信を 1 週間待ったがとうとう来なかった、みたいな事が裏で起きてるんじゃないかと勝手に想像してる。
実は、 Twitter に無視されたと勘違いして、その 1 週間の間に同様のメールを数通送り直した。そっちには返信はなかった。
追記 (12/01/07): Twitter のフォームで入力した情報は現在のアカウント所有者に知らされる、という風な事がどこかに書いてあった気がする (うろ覚えだから違うかも知れない)