晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
Server : Apache System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64 User : rainic ( 1014) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /usr/share/doc/ea-apache24-mod_ruid2/ |
Upload File : |
ABOUT
mod_ruid2 is a suexec module for apache 2.0, 2.2 and 2.4, based on mod_ruid and mod_suid2
-it runs only on linux because afaik only linux has implemented posix 1003.1e capabilities
-it has better performance than mod_suid2 because it doesn`t need to kill httpd children
after one request. it makes use of kernel capabilites and after receiving a new request suids again.
-there are some security issues, for instance if attacker successfully exploits the httpd process,
he can set effective capabilities and setuid to root. i recommend to use some security patch in kernel (grsec),
or something..
-there are two main operation modes: stat and config
1. config
is default, you must define uid and gid. If no [ug]id is defined the default user and group are used.
2. stat
httpd setuid and setgid to uid and gid of requested filename(script)/directory
this is good if you use mod_vhost_alias for virtual hosting
INSTALL
1. download and install latest libcap from here
2. run /apachedir/bin/apxs -a -i -l cap -c mod_ruid2.c
3. configure httpd.conf
4. restart apache
CONFIGURE OPTIONS:
RMode config|stat (default is config)
RUidGid user|#uid group|#gid - when RMode is config, set to this uid and gid
RMinUidGid user|#uid group|#gid - when uid/gid is < than min uid/gid set to default uid/gid
RDefaultUidGid user|#uid group|#gid
RGroups group1 group2 - aditional groups set via setgroups
@none - clear all previous defined groups.
RDocumentChrRoot - Set chroot directory and the document root inside
EXAMPLE:
LoadModule ruid2_module modules/mod_ruid2.so
User apache
Group apache
RMode stat
RGroups apachetmp
RDocumentChRoot /home /example.com/public_html
NameVirtualHost 192.168.0.1
<VirtualHost example.com>
ServerAdmin webmaster@example.com
RDocumentChRoot /home /example.com/public_html
ServerName example.com
ServerAlias www.example.com
RMode config # unnecessary since config is the default
RUidGid user1 group1
RGroups apachetmp
<Directory /home/example.com/public_html/dir>
RMode stat
</Directory>
<Directory /home/example.com/public_html/dir/test>
RMode config
RUidGid user2 group2
RGroups groups1
</Directory>
<Directory /home/example.com/public_html/dir/test/123>
RUidGid user3 group3
</Directory>
<Location /yustadir>
RMode config
RUidGid user4 user4
RGroups groups4
</Location>
</VirtualHost>
<VirtualHost example.net>
ServerAdmin webmaster@example.net
DocumentRoot /home/example.net/public_html
ServerName example.net
ServerAlias www.example.net
</VirtualHost>