[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
[webdav-jp:0626] Re: Apache2 WebDAV エンコード操作
吉山です。自己フォロー。
一部嘘書いていたので、直しました。更に差し替えをお願いします。
--
吉山あきら <yosshy@xxxxxxxxxxxx>
On Sun, 1 Dec 2002 15:33:57 +0900
Akira YOSHIYAMA <yosshy@xxxxxxxxxxxx> wrote:
>
> 吉山です。
>
> 公開ありがとうございました。> 宮本さん
> 早速ですいませんが、更新しましたので添付のファイルを差し替えて頂けますか?
>
> --
> 吉山あきら <yosshy@xxxxxxxxxxxx>
>
>
> On Sun, 1 Dec 2002 14:55:09 +0900
> "Kunio Miyamoto" <wakatono@xxxxxxxxxx> wrote:
>
> >
> > みやもとです。
> >
> > > とりあえず、http://www.debian.or.jp/~yosshy/ に必要なファイルを置きま
> > > した。御賞味下さい。
> > > なお、011_path_iconv は 010_diskquota 適用を前提に作ってあります(機能
> > > 上は必要ではありません)。どうしても 010_diskquota を使わずに
> > > 011_path_iconv を使用したい場合は手でパッチの内容をソースに反映して下さ
> > > い。
> >
> > 反映が遅れて申し訳ございませんです (_ _)
> >
> > やっとこさ WebDAV Resources JP ( http://webdav.todo.gr.jp/ ) にも反映しま
> > した。
> > 扱いは Experimental になります。
> >
> > ---
> > 宮本 久仁男 ( Kunio Miyamoto )
> > E-mail: wakatono@xxxxxxxxxx
> > WebDAV Resources JP: http://webdav.todo.gr.jp/
> >
> >
>
>
> --
> 吉山あきら <yosshy@xxxxxxxxxxxx>
>
--
吉山あきら <yosshy@xxxxxxxxxxxx>
Apache WebDAV (mod_dav_fs) Disk Quota ?p?b?`
?g?R? ?«?ç <yosshy@xxxxxxxxxxxx>
2002/12/01
?¡?Ü?¦?ª?«
?Ê?í?AISP ?Å?ñ???³?ê?é?P???[?U???½?è?Ì?f?B?X?N?e?Ê?Ì?§?À?Í?ADisk
Quota ?Æ?Ä?Î?ê?é OS ?Ì?@?\?ð?p?¢?Ä?À?»?³?ê?Ä?¢?Ü?·?B?±?ê?Í?A???L?Ò?ª?¯
?ê?Ì?t?@?C???^?f?B???N?g???Ì???Ê?ð?ê?è?Ê?É?§?À?·?é?@?\?Å?ASolaris ?â
HP-UX ?È?Ç?Ì?¤?p OS ?Í?à?¿?ë?ñ?ALinux ?â *BSD ?È?Ç?Ì?t???[ OS ?É?à?W??
?Å?p?Ó?³?ê?Ä?¢?Ü?·?B
?]???AISP ?É?Î?·?é?t?@?C???Ì?A?b?v???[?h?è?i?É?Í FTP ?ª?p?¢?ç?ê?Ä?«
?Ü?µ?½?BFTP ?Å?t?@?C???ð?T?[?o?É?A?b?v???[?h?·?é?Û?A?Ê?í?Í FTP ?f?[??
???ª root ? ?À?Å?N?®?µ?A???O?C???µ?½?ê?Ê???[?U?Ì? ?À?É?Ú?s?µ?Ä?t?@?C???^
?f?B???N?g???ð?ì?¬?µ?Ü?·?B?±?Ì?½?ß?A?ì?¬?³?ê?½?t?@?C???^?f?B???N?g???Ì
???L?Ò?Í???O?C?????[?U?É?È?è?Ü?·?B
?Æ?±?ë?ª?AApache ?Í?Z?L?????e?B?ã?Ì???R?É?æ?è?Aroot ? ?À?Å?Ì?®?ì?ð??
?§?µ?Ä?¢?Ü?¹?ñ?B?±?Ì?½?ß?AApache ?Í?Ê?í?A?ê?p?Ì?ê?Ê???[?U?â nobody ???[
?U?Æ?µ?Ä?®?ì?·?é?æ?¤?Ý?è?³?ê?Ü?·?B?±?Ì?½?ß?AApache WebDAV ?Å?ì?¬?³?ê?½
?t?@?C???Ì???L?Ò?Í Apache ?Ì?®?ì???[?U?É?È?é?½?ß?A???[?U?P?Ê?Å?Ì Disk
Quota ?@?\?ª?g?¦?Ü?¹?ñ?B?±?Ì?â?è?Í ISP ?É?¨?¯?é WebDAV ?T?[?r?X?ñ???Ì
?l?b?N?Å? ?è?AApache ?É?æ?é WebDAV ?Ì???y?ð?W?°?é?ê?ö?Å? ?Á?½?Æ?l?¦?Ä
?¢?Ü?·?B
?{?p?b?`?Í?AApache WebDAV ?ª?V?µ??t?@?C???^?f?B???N?g???ð?ì?¬?E?Ú?®
?·?é?Û?A?Á?ê?È?R?}???h?ð?Ä?Ñ?o?·???Å?AApache ?ð?ê?Ê???[?U? ?À?Å?®
?ì?³?¹?È?ª?ç Disk Quota ?@?\?ð?L?ø?É?·?é?½?ß?Ì?à?Ì?Å?·?B
?¡?{?p?b?`?Ì?í?ª
?{?p?b?`?ð?K?p?µ?½ Apache ?Í?A?t?@?C???^?f?B???N?g???Ì?ì?¬?^?Ú?®???É
?Á?ê?È?c?[??(chown_user)?ð?À?s?µ?Ü?·?B?±?Ì?c?[???Í setuid ?³?ê?Ä?¨?è?A
?ø???Å?w?è?³?ê?½?t?@?C???^?f?B???N?g???Ì?p?[?~?b?V?????ð
???L?Ò?FApache ?Ì?®?ì???[?U ?¨ ?z?u?f?B???N?g???Ì???L?Ò (rw)
?O???[?v?FApache ?Ì?®?ì?O???[?v(r ?¨ rw)
?»?Ì?¼?F(r ?È?¢?µ?½?à?È?µ)
(?f?B???N?g???Í?±?ê?É x ?ª?ü?Á?½?à?Ì)
?É?Ï?X?µ?Ü?·?B
?Ê?í?A? ?é???[?U?p?Ì?f?B???N?g???É???L?Ò?ª?Ê???[?U?Ì?t?@?C???ð?u??K
?v?Í?Ù?Æ?ñ?Ç? ?è?Ü?¹?ñ?B?æ?Á?Ä?A?t?@?C???^?f?B???N?g???Ì?ì?¬???É?A?»?ê
?ª?u?©?ê?é?f?B???N?g??(?z?u?f?B???N?g??)?Ì???L?Ò?Æ?¯?¶???L?Ò?É?Ï?X?·?é
?æ?¤?É?µ?Ä?µ?Ü?¦?Î?A?P???[?U?Ì?f?B???N?g???z?º?Ì?t?@?C???^?f?B???N?g??
?Í?S?Ä?¯?¶???L?Ò?ð???Â?±?Æ?É?È?è?Ü?·?B?±?ê?É?æ?è Disk Quota ?ð?À?»?µ?Ü
?·?B
?±?±?Å???Ó?·?×?«???ª? ?è?Ü?·?B?t?@?C???^?f?B???N?g???ð???ì?Å?«?é???[
?U?ð?»?Ì???L?Ò?Æ Apache ?¾?¯?É?§?À?·?é?½?ß?É?A?ê?Ê???[?U?ð Apache ?Ì?®
?ì?O???[?v?É?o?^?µ?Ä?Í?¢?¯?Ü?¹?ñ?B
?¡?p?Ó?·?é?à?Ì
?EApache Web Server ver.2 (?Å?V?Í 2.0.43)
?Edisk quota ?p?b?` (010_diskquota.gz)
?Echown_user ?\?[?X(chown_user.c.gz)
?¡?\?z
0)?æ?q?Ì?\?[?X?A?p?b?`?ð?_?E?????[?h?µ?A?¯?¶?f?B???N?g???É?u?«?Ü?·?B
disk quota ?p?b?`?Achown_user ?\?[?X?ª gzip ?³?k?³?ê?Ä?¢?é?ê???Í?ð??
?µ?Ä?¨?¢?Ä?º?³?¢?B
1)Apache ?Ì?\?[?X?ð?W?J?µ?Ä?A010_diskquota ?p?b?`?ð???Ä?Ü?·?B
?È?¨?A?p?b?`?Í Debian ?Ì Apache2 ?p?É?ì?ç?ê?Ä?¢?Ü?·?B?Ê?í?Ì?\?[?X?É
?Î?µ?Ä?K?p?·?é?ê???Í?È?º?Ì?æ?¤?É?À?s?µ?Ä?º?³?¢?B
# gzip -dc httpd-2.0.43.tar.gz | tar -xvf -
# cd httpd-2.0.43
# patch -p2 < ../010_diskquota
2)~httpd/srclib/apr/include/apr_file_diskquota.h ?É? ?é chown_user ?R
?}???h?Ö?Ì?p?X?Ì?Ý?è(?º?L)?ð?A?C???X?g?[???µ?æ?¤?Æ?µ?Ä?¢?é?Â?«?É???í
?¹?Ä?º?³?¢?B(?»?Ý?Ì?p?X"/usr/lib/apache2/chown_user" ?Í Debian ?Â?«
?É???í?¹?Ä? ?è?Ü?·)
#define CHOWN_USER_PATH "/usr/lib/apache2/chown_user"
FixMe: ?N?© suexec ?Æ?¯?l?É?p?X?ð?Ý?è?·?é?û?@?ð?³?¦?Ä?º?³?¢?B
3)Apache ?ð???Ê?É?C???X?g?[???µ?Ü?·?B?Ü?_?AWebDAV ?@?\?ð?L?ø?É?·?é???ð
?Y?ê?È?¢?Å?º?³?¢?B?Ú?µ??Í ~httpd/INSTALL ?ð?Q?Æ?µ?Ä?º?³?¢?B
4)chown_user.c ?ð?C?³?µ?Ü?·?B?`?ª?Ì?è?`?Ì?¤?¿
#define ROOT_DIR "/var/www/dav" ?c WebDAV ?t?H???_?Ì?g?b?v?f?B???N?g??
#define MAX_PATH_LEN 128 ?c ???ì?·?é?t?@?C???Ì?Å?å?t???p?X?·
#define APACHE_OWNER "www-data" ?c Apache ?Ì?®?ì???[?U
#define APACHE_GROUP "www-data" ?c Apache ?Ì?®?ì?O???[?v
#define MIN_UID 1000 ?c ???[?U ID ?Ì?Å?¬?l
#define MAX_UID 9999 ?c ???[?U ID ?Ì?Å?å?l
?ð?C?³?µ?Ü?·?B?K?Ø?É?Ý?è?µ?È?¢?Æ?À?ø?ã?Ù?í?I?¹?µ?Ü?·?B
???F?À?Û?É?Í?AAPACHE_OWNER ?Ì?è?`?Í?g?p?³?ê?Ä?¢?Ü?¹?ñ?B
5)chown_user.c ?ð?R???p?C???E?C???X?g?[???µ?Ü?·?B
# gcc -Wall -o chown_user chown_user.c
# chmod root.www-data chwon_user
# chown 4050 chown_user
# cp chown_user /usr/lib/apache2
"www-data" ?Ì???Í Apache ?Ì?®?ì?O???[?v?A"/usr/lib/apache2" ?Í 2)?Å
?w?è?µ?½?f?B???N?g???ð?w?è?µ?Ü?·?B
6)Apache ?Ì?Ý?è?t?@?C???ð?K?Ø?É?Ý?è?µ?ADAV ?ð?L?ø?É?µ?Ä?º?³?¢?B?Å?à?V
???v???È?w?è?Í?º?L?Ì?æ?¤?É?È?è?Ü?·?B
--- /var/www/dav ?ð WebDAV ?L?ø?É?·?é?Ý?è
DAVLockDB /var/lock/apache2/DAVLock
Alias /dav "/var/www/dav/"
<Location /dav>
DAV on
</Location>
---
6)Apache ?ð?N?®?µ?A?@?\?ð?m?F?µ?Ü?·?B
?¡chown_user ?R?}???h?Ì?Z?L?????e?B
chown_user ?Ì?g?¢?û?Í?º?L?Ì?Ê?è?Å?·?B
# chown_user <path_of_a_file/directory>
chown_user ?R?}???h?Í?Å?«?é?¾?¯?À?S?È?ì?è?É?µ?½?Â?à?è?Å?·?B?º?L?Ì?ð
???`?F?b?N?ð?s?¢?A?ð???É???í?È?¢?ê???Í?G???[?I?¹?µ?Ü?·?B
?E?ê?è?·?È?ã?Ì?p?X?¼?ð???Û?µ?Ü?·(?o?b?t?@?I?[?o?t???[?Î?ô)?B
?E???Î?p?X?ð???Û?µ?Ü?·?B
?EROOT_DIR ?Å?w?è?µ?½?f?B???N?g???z?º?Å?È?¢?p?X?ð???Û?µ?Ü?·?B
?EROOT_DIR ?Å?w?è?µ?½?f?B???N?g???»?Ì?à?Ì?ð???Û?µ?Ü?·?B
?E?Ê?í?Ì?t?@?C???A?f?B???N?g???È?O?Ì?p?X?ð???Û?µ?Ü?·?B
?E?¡???Ì?n?[?h?????N?ð???Â?t?@?C???Ö?Ì?p?X?ð???Û?µ?Ü?·?B
?E".."?ð?Ü?Þ?p?X?ð???Û?µ?Ü?·?B
?E?V???{???b?N?????N?ð?Ü?Þ?p?X?ð???Û?µ?Ü?·?B
?E?z?u?f?B???N?g???ª MIN_UID?AMAX_UID ?Å?w?è?³?ê?½?Í?Í?È?O?Ì UID ?ð??
?Â?p?X?ð???Û?µ?Ü?·?B
?EApache ?Ì?®?ì?O???[?v?Æ?Ù?È?é?O???[?v?ð???Â?p?X?ð???Û?µ?Ü?·?B
?¼?É?à?Z?L?????e?B?É?Ö?·?é?z?¶?Æ?µ?Ä?A?È?º?Ì?à?Ì?ª? ?è?Ü?·?B
?E?Ý?è?t?@?C???Ï?X?É?æ?é?N???b?L???O?ð?h?~?·?é?½?ß?Achown_user ?Í?Ý?è
?t?@?C???ð?p?¢?¸?A?K?v?È?Ý?è?Í?S?Ä?R???p?C?????É?\?[?X?É???«???Þ?æ?¤
?É?µ?Ä? ?è?Ü?·?B
?E?O???[?v?ð Apache ?Ì?®?ì?O???[?v?É?µ?Ä?A?p?[?~?b?V?????ð 4050 ?É?µ?Ä
? ?è?Ü?·?B?±?ê?É?æ?è?AApache ?È?O?Ì???[?U?Í?±?Ì?R?}???h?ð?À?s?Å?«?Ü
?¹?ñ?B
?E?ø???É?p?X?¼?È?O?ð?K?v?Æ?µ?Ü?¹?ñ?B
?¡?A?N?Z?X?§?À?É?Â?¢?Ä
Apache ?Ì?ê???A?P???É WebDAV ?p?É?e???[?U?Ì?f?B???N?g???É?Î?µ?Ä?A?N
?Z?X?§?À?ð?t?¯?é?Æ?A?t?@?C???{???Ì?Û?É?à?A?N?Z?X?§?À?ª??¢?Ä?µ?Ü?¢?Ü?·?B
Linux 2.4 ?È?~?Ì?ê???A?Á?ê?È?}?E???g?I?v?V????(-o bind)?Å?Á?è?f?B???N
?g???z?º?ð?Ê?Ì?f?B???N?g???É?}?E???g?Å?«?é?Ì?Å?A?Ð?û?Å WebDAV ?p?É?A?N
?Z?X?§?À?ð?t?¯?A?à?¤?Ð?û?Å WWW ?p?É?A?N?Z?X?§?À?ð?µ?È?¢?æ?¤?Ý?è?·?é?û
?@?ª? ?è?Ü?·?B
?¼?Ì OS ?Å?À?»?·?é?ê???Í?A?V???{???b?N?????N?ð???Â?·?é?æ?¤?É?Ý?è?µ?Ä
?ã?L?Æ?¯?l?É?·?é?©?AWebDAV ?p?Æ WWW ?p?Ì?Ý?è?t?@?C???ð?p?Ó?µ?A?|?[?g?Ô
???ð?ª?¯?Ä?Q?Â?Ì Apache ?ð?N?®?·?é???Å?â?è?ð?ñ?ð?·?é???ª?Å?«?Ü?·?B