動作確認のため、外向きサーバの Web データをコピーする。
GID
その前に、apache はどの GID で動く?
yasunari@tswxl:/etc/apache2$ grep -i group *
apache2.conf:# The configuration directives are grouped into three basic sections:
apache2.conf:Group ${APACHE_RUN_GROUP}
envvars:export APACHE_RUN_GROUP=www-data
yasunari@tswxl:/etc/apache2$
grup を変更する
tswxl:~# cd /home/httpd/
tswxl:/home/httpd# ls
cgi-bin html
tswxl:/home/httpd# chgrp www-data *
tswxl:/home/httpd# chmod g+w *
tswxl:/home/httpd#
ディレクトリに、set gid bit を立てる
tswxl:/home/httpd# chmod g+s *
tswxl:/home/httpd# ls -al
total 0
drwxr-xr-x 4 root root 31 Jun 1 22:58 .
drwxr-xr-x 4 root root 33 Jun 1 22:58 ..
drwxrwsr-x 2 root www-data 6 Jun 1 22:58 cgi-bin
drwxrwsr-x 2 root www-data 6 Jun 1 22:58 html
tswxl:/home/httpd#
yasunari を www-data のメンバにする
tswxl:~# adduser yasunari www-data
Adding user `yasunari' to group `www-data' ...
Adding user yasunari to group www-data
Done.
tswxl:~# exit
logout
yasunari@tswxl:~$
コピーする
yasunari でログインし直してグループの権限を持ち直してから
rsync でコピーする
yasunari@tswxl:~$ umask 2
yasunari@tswxl:~$ rsync -rtvpogtlH rsync://192.168.1.3/httpd/html /home/httpd
:
:
yasunari@tswxl:~$ rsync -rtvpogtlH rsync://192.168.1.3/httpd/cgi-bin /home/httpd
:
:
yasunari@tswxl:~$
確認
http://192.168.2.70/ へアクセスして静的ページが表示されることを確認、
http://192.168.2.70/cgi-bin/BBS/eztree.cgi へアクセスして、
BBS の CGI が動作していることを確認。。。。。
表示はされるが、投稿ができない。。。
Copyright (C) 2003-2010 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp
山下康成@京都府向日市