Solaris 10中一些默认内置帐号的用途

11:03下午 五月 11, 2008 in category General by 快快播谷

安装了Solaris 10之后,系统里就有了一些内置帐号,都有什么用途呢?下面的内容做个参考。

登录帐户 GID 用法
root 0 几乎没有任何限制。可覆盖所有其他登录、保护和权限。root 帐户具有访问整个系统的权限。应该非常谨慎地保护root 登录口令。root 帐户(即超级用户)有权使用大多数Solaris 命令。
daemon 1 控制后台处理。
bin 2 有权使用部分Solaris 命令。
sys 3 有权访问许多系统文件。
adm 4 有权访问某些管理文件。
lp 71 有权访问打印机的对象数据文件和假脱机数据文件。
uucp 5 有权访问UUCP(UNIX 对UNIX 复制程序)的对象数据文件和假脱机数据文件。
nuucp 9 供远程系统用于登录到系统并启动文件传输。

评论[0]

pgsql 命令的说明

04:07下午 四月 26, 2008 in category 数据库 by 快快播谷

一般性
  \c[onnect] [资料库名称|- 用户名称|- 主机|- 埠号|-]
                 连线到新的资料库 (目前是 "postgres")
  \cd [目录]     改变目前的工作目录
  \copyright     显示 PostgreSQL 的使用和发行条款
  \encoding [字元编码名称]
                 显示或设定用户端字元编码
  \h [名称]      SQL 命令语法上的说明,用 * 显示全部命令
  \q             退出 psql
  \set [名称 [值数]]
                 设定内部变数,若无参数则列出全部变数
  \timing        切换命令计时开关 (目前是 关闭)
  \unset 名称    清空(删除)内部变数
  \prompt [文本] 名称
                 提示用户设定内部变数
  \! [命令]      在 shell 里执行命令或开启一个 shell

查询缓存区
  \e [档案]      使用外部编辑器编辑查询缓存区(或档案)
  \g [档案]      将查询缓存区送至伺服器 (并把结果写入档案或 | 管线"pipe")
  \p             显示查询缓存区的内容
  \r             重置(清除)查询缓存区
  \w 档案        将查询缓存区写入档案

输入/输出
  \echo [字串]   将字串写至标准输出
  \i 档案        从档案中执行命令
  \o [档案]      将全部查询结果写入档案或 |管道"pipe"
  \qecho [字串]
                 将字串写入查询输出串流 (参考 \o)

资讯性
  \d [名称]      为资料表、索引、序列数或视观表加上注解
  \d{t|i|s|v|S} [模型]  (加上 "+" 取得更多资讯)
                 列出资料表/索引/序列数/视观表/系统资料表
  \da [模型]     列出聚集函数
  \db [模型]     列出表空间 (加上 "+" 取得更多资讯)
  \dc [模型]     列出字元编码转换
  \dC            列出型别转换
  \dd [模型]     显示物件的注解
  \dD [模型]     列出共同值域
  \df [模型]     列出函数(加上 "+" 取得更多资讯)
  \dF [模型]     列出文本搜寻组态 (加上 "+" 取得更多资讯)
  \dFb [模型]     列出文本搜寻字典 (加上 "+" 取得更多资讯)
  \dFt [模型]     列出文本搜寻样式
  \dFp [模型]     列出文本搜寻剖析器 (加上 "+" 取得更多资讯)
  \dg [模型]     列出群组
  \dn [模型]     列出架构模式 (加上 "+" 取得更多资讯)
  \do [名称]     列出运算子
  \dl            列出大型物件,同 \lo_list
  \dp [模型]     列出资料表、视观表和序列数的存取权限
  \dT [模型]     列出资料型别(加上 "+" 取得更多资讯)
  \du [模型]     列出角色
  \l             列出全部资料库(加上 "+" 取得更多资讯)
  \z  [模型]     列出资料表、视观表和序列数存取权限(同 \dp)

格式化
  \a             切换非对齐模式和对齐模式
  \C [字串]      设定资料表标题或取消
  \f [字串]      显示或设定非对齐模式的栏位分隔符号
  \H             切换 HTML 输出模式 (目前是 关闭)
  \pset 名称 [值数]
                 设定资料表输出选项
                 (名称:= {format|border|expanded|fieldsep|footer|null|
                 recordsep|tuples_only|title|tableattr|pager})
  \t             只显示资料列 (目前是 关闭)
  \T [字串]      设定 HTML 表格标签属性
  \x             切换扩展输出模式(目前是 关闭)

复制(Copy),大型物件(Large Object)
  \copy ...      执行 SQL COPY,资料流指向客户端主机
  \lo_export LOBOID 档案
  \lo_import 档案 [COMMENT]
  \lo_list
  \lo_unlink LOBOID    大型物件运算子

评论[0]

psql命令语法

04:03下午 四月 26, 2008 in category 数据库 by 快快播谷

psql使用方法:
  psql [选项]... [资料库名称 [用户名称]]

一般性选项:
  -d 资料库名称   指定要连线的资料库
  -c 命令         执行单一命令(SQL或内部指令)然后结束
  -f 档案名称     从档案中执行命令然后结束
  -1 ("one")      执行命令档作为一个单一的事务交易
  -l              列出所有可用资料库然后结束
  -v 名称=值数    设置 psql 变数名称为指派值
  -X              不要读取启动档 (~/.psqlrc)
  --help          显示这份说明然后结束
  --version       显示版本资讯然后结束

输入和输出选项:
  -a              显示所有来自命令稿本的输入
  -e              显示传送给伺服器的命令
  -E              显示内部指令产生的查询
  -q              安静模式 (没有讯息,只有查询结果)
  -o 档案名称     将查询结果写入档案(或 | 管线"pipe")
  -n              关闭命令列加强编辑模式(readline)
  -s              单步模式 (确认每个查询)
  -S              单行模式 (一行就是一条 SQL 命令)
  -L 档案名称     将 Session 记录写入档案

输出格式选项 :
  -A              使用非对齐表格输出模式(-P 格式=unaligned)
  -H              HTML 表格输出模式 (-P 格式=html)
  -t              仅输出资料列(-P tuples_onle)
  -T 文本         设定 HTML 表格标记属性 (width, border) (-P tableattr=)
  -x              打开扩展表格输出 (-P expended)
  -P VAR[=ARG]    将显示选项 VAR 设为 ARG (查阅 \pset 命令)
  -F 字串         设定栏位分隔符号 (预设:"|") (-P fieldsep=)
  -R 字串         设定记录分隔符号 (预设:换行符号) (-P recordsep=)

连线选项:
  -h 主机名称     资料库伺服器主机或 socket 目录 (预设:"本地接口")
  -p 埠号         资料库伺服器埠号 (预设:"5432")
  -U 名称         指定资料库用户
  -W              强制询问密码 (应该会自动询问)

在 psql 里键入 "\?"(用于内部指令)或者 "\help"(用于SQL命令),
或者参考 PostgreSQL 文件的 psql 章节以取得更多相关资讯。

回报程式臭虫(Bugs)到 <pgsql-bugs@postgresql.org>。

评论[0]

W3SCHOOL的官方中文站出来了

11:54上午 三月 14, 2008 in category General by 快快播谷

w3school出中文网站了。了解互联网的基础知识,可以到这里看啊。这个网站内容丰富,覆盖面广,平常做个参考也是很不错的。http://www.w3school.com.cn/

评论[0]

FreeBSD 7.0正式发布了!!

09:59下午 二月 28, 2008 in category FreeBSD by 快快播谷

 

FreeBSD 7.0发布
  2008年1月27日,FreeBSD技术团队发布了可用的FreeBSD7.0。这是版本7发布的第一个稳定版,和以前的发布版比增加了新的功能及功能的增强。一些亮点包括:
●性能的显著提高和在数据库及其它基准下的SMP能力,在通常的负载下比FreeBSD6.X性能提高350%,高负载下提高1500%。比最好性能的Linux内核(2.6.22或者2.6.24)好15%。以基准分析和证明的系统性能,在你的实际环境下可能有些出入。这些改进上改变包括:
  ○1.1 libthr线程模型是默认的。
  ○进程间通讯(IPC)、网络、调度器锁的改进。
  ○SMP架构的优化,这个已经在5.x和6.x分支中存在。
一些性能指标按线性增加,最大到8个CPU。对于多核心系统,很多工作负载显著提高。
●ULE调度器被极大地改良,提供了增强的性能和交互能力。7.0中4BSD调度器仍旧是默认的,但是在将来的7.1中ULE将会是默认调度器。
●增加了对Sun ZFS文件系统的试验性的支持。
●gjournal 能够被用来设置记账式文件系统,gvirstor能够被作为虚拟化存储供应者。
●XFS文件系统的只读支持。
●unionfs文件系统被修正
●iSCSI启动程序。
●对一些网络驱动器的TSO和LRO支持。
●试验性的SCTP(Stream Control Transmission Protocol)支持(FreeBSD成为其参考实现)。
●更多改进的无线(802.11)支持。
●从 OpenBSD 引入了网络链路聚合/trunking (lagg(4))。
●为 BPF 增加了即时编译为本地代码的能力,改善了捕捉包的性能。
●对基于 ARM 架构的嵌入式系统开发板的支持进行了大幅度的改善。
●引入了新的、具有高可伸缩性的用户态内存分配器 jemalloc。
●在原先的安装同一版本的安全和可靠性更新的基础上, freebsd-update(8) 正式提供了对于在不同发行版本之间进行二进制升级的支持。
●X.Org 7.3, KDE 3.5.8, GNOME 2.20.2
●GNU C compiler 4.2.1.
●BIND 9.4.2

更多信息参看FreeBSD官方网站。

评论[0]

Solaris 关机命令shutdown

10:33下午 一月 29, 2008 in category General by 快快播谷

 /usr/sbin/shutdown  [-y]  [-g grace-period]  [-i init-state] [message]

-y 不需要用户干预回答确认信息命令就可运行

-g 关机之前的停留时间,默认60秒

-i 关机状态 0 1 s 5 6

message 关机时发给用户的信息

例子: /usr/sbin/shutdown -y -g30 -i0 "System Power Off"

评论[0]

Solaris 关机命令shutdown

10:25下午 一月 29, 2008 in category Solaris by 快快播谷

/usr/sbin/shutdown [ -y ] [ -g<grace> ] [ -i<initstate> ] [ message ]

-y 预先回答确认问题,不需要用户干涉命令就可运行

-g 关机之前的停留秒数,默认是60

-i 状态信号 0 1 s 5 6

message 是发给登录用户的消息

例如 /usr/sbin/shutdown -y -g30 -i0 "System Power Off"

评论[0]

Solaris touch /reconfigure 检测新安装的软件

09:42下午 一月 29, 2008 in category Solaris by 快快播谷

touch /reconfigure

  这个命令就是创建一个空的reconfigure文件,solaris在重新启动否发现这个文件,会重新检测硬件。

评论[0]

Solaris更换自己使用的shell

04:02下午 一月 28, 2008 in category Solaris by 快快播谷

usermod -s shell 帐号

例如:

usermod -s /bin/csh root

评论[0]

Solaris 10下PostgreSQL的安装

08:19下午 一月 21, 2008 in category Solaris by 快快播谷

  Solaris 10上已经安装有PostgreSQL,只是还没有初始化,现在让我们看看如何将其启动起来。PostgreSQL服务是使用SMF管理的,让我们看看PostgreSQL的当前状态:

bash-3.00# svcs -a | grep sql
disabled       16:38:04 svc:/application/database/postgresql:version_81
disabled       19:33:19 svc:/application/database/postgresql:version_82

  我们现在启动PostgreSQL8.2,输入如下命令:

bash-3.00#svcadm enable svc:/application/database/postgresql:version_82

  在查看一下当前的状态:

bash-3.00# svcs -a | grep sql
disabled       16:38:04 svc:/application/database/postgresql:version_81
maintenance       19:33:19 svc:/application/database/postgresql:version_82

  PostgreSQL8.2处于维护状态(maintenance),没有启动起来。让我们来看看没有启动的原因:

bash-3.00#svcs -x

svc:/application/print/server:default (LP print server)
 状态:disabled 自 2008年01月21日 星期一 16时37分59秒 开始
原因:管理员已将其禁用。
   参见:http://sun.com/msg/SMF-8000-05
   参见:lpsched(1M)
影响:2 相关服务未运行。  (使用 -v 列出)。

svc:/application/database/postgresql:version_82 (PostgreSQL RDBMS)
 状态:maintenance 自 2008年01月21日 星期一 16时38分32秒 开始
原因:启动方法 退出,代码为 $SMF_EXIT_ERR_CONFIG。
   参见:http://sun.com/msg/SMF-8000-KS
   参见:postgres_82(1)
   参见:/var/svc/log/application-database-postgresql:version_82.log
影响:此项服务未运行。

 

  提示我们查看 /var/svc/log/application-database-postgresql:version_82.log文件,看看这个文件中内容:

 bash-3.00#cat  /var/svc/log/application-database-postgresql:version_82.log

[ Nov 28 15:58:35 Disabled. ]
[ Nov 28 15:58:36 Rereading configuration. ]
[ 11月 28 16:39:03 Rereading configuration. ]
[  1月 21 16:26:30 Enabled. ]
[  1月 21 16:26:30 Executing start method ("/lib/svc/method/postgresql start") ]
postgresql/data directory /var/postgres/8.2/data is not a valid PostgreSQL data directory
postgresql/data directory /var/postgres/8.2/data may not have been initialized
To initialize the postgresql/data directory /var/postgres/8.2/data run 'initdb /var/postgres/8.2/data'

[  1月 21 16:26:30 Method "start" exited with status 96 ]
[  1月 21 16:38:31 Executing start method ("/lib/svc/method/postgresql start") ]
postgresql/data directory /var/postgres/8.2/data is not a valid PostgreSQL data directory
postgresql/data directory /var/postgres/8.2/data may not have been initialized
To initialize the postgresql/data directory /var/postgres/8.2/data run 'initdb /var/postgres/8.2/data'
[  1月 21 16:38:32 Method "start" exited with status 96 ]

  

 

  这回知道原因了,我们没有初始化数据库。PostgreSQL安装在/usr/postgres/8.2/下,我们进入这个目录,我们会看到initdb这个用来初始化数据库的可执行文件,这个命令必须使用postgres这个账号来运行,让我们切换到postgres账号,来执行这个命令:

bash-3.00#su postgres

$ initdb /var/postgres/8.2/data

  如果不出什么意外,安装完毕后我们就可以使用 svcadm enable svc:/application/database/postgresql:version_82 命令来启动PostgreSQL8.2。启动之后我们可以使用默认的数据库帐号postgres登录,默认的密码是空的。

  PostgreSQL对安全限制的很严,如果你要从其它计算机登录,必须修改配置文件。 配置文件在/var/postgres/8.2/data目录下,修改postgres.conf,添加listen_addresses = '*',表示允许从所有计算机登录,还要修改pg_hba.conf,添加一行host    all         all         192.168.1.0/24        trust ,注意这个ip要是你所在机器的网络范围,由于我对PostgreSQL不是很熟,具体有关PostgreSQL的配置自己研究吧,希望对你有所帮助!

  补充:下面我机器上的用于定义PostgreSQL的SMF服务的postgresql.xml文件,在/var/svc/manifest/application/database目录下。内容如下:

<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
 Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 Use is subject to license terms.

 ident    "@(#)postgresql.xml    1.1    07/01/31 SMI"

        NOTE:  This service manifest is not editable; its contents will
        be overwritten by package or patch operations, including
        operating system upgrade.  Make customizations in a different
        file.
-->

<service_bundle type='manifest' name='postgresql'>

<service
        name='application/database/postgresql'
        type='service'
        version='1'>

    <!--
       Wait for network interfaces to be initialized.
    -->
        <dependency
                name='network'
                grouping='require_all'
                restart_on='none'
                type='service'>
                <service_fmri value='svc:/milestone/network:default' />
        </dependency>

    <!--
       Wait for all local filesystems to be mounted.
    -->
        <dependency
                name='filesystem-local'
                grouping='require_all'
                restart_on='none'
                type='service'>
                <service_fmri value='svc:/system/filesystem/local:default' />
        </dependency>

        <exec_method
                type='method'
                name='start'
                exec='/lib/svc/method/postgresql start'
                timeout_seconds='60' />

        <exec_method
                type='method'
                name='stop'
                exec='/lib/svc/method/postgresql stop'
                timeout_seconds='60' />

        <exec_method
                type='method'
                name='refresh'
                exec='/lib/svc/method/postgresql refresh'
                timeout_seconds='60' />

        <!--
          Both action_authorization and value_authorization are needed
          to allow the framework general/enabled property to be changed
          when performing action (enable, disable, etc) on the service.
        -->
        <property_group name='general' type='framework'>
        <propval name='value_authorization' type='astring'
            value='solaris.smf.value.postgres' />
        <propval name='action_authorization' type='astring'
            value='solaris.smf.manage.postgres' />
        </property_group>

        <!--
          We define two instances of PostgreSQL as examples (8.1 & 8.2).
        -->

        <instance name='version_81' enabled='false'>

            <method_context>
                    <method_credential user='postgres' group='postgres' />
            </method_context>

        <!--
           Make sure the data configurable property points to the
           appropriate database directory.
        -->
            <property_group name='postgresql' type='application'>
                    <propval name='bin' type='astring'
                           value='/usr/bin' />
                    <propval name='data' type='astring'
                           value='/var/lib/pgsql/data' />
                    <propval name='log' type='astring'
               value='server.log' />
            <propval name='value_authorization' type='astring'
               value='solaris.smf.value.postgres' />
            </property_group>

        </instance>

        <instance name='version_82' enabled='false'>

            <method_context>
                    <method_credential user='postgres' group='postgres' />
            </method_context>

        <!--
           Make sure the data configurable property points to the
           appropriate database directory and port number in
           postgresql.conf is different than the first instance.
        -->
            <property_group name='postgresql' type='application'>
                    <propval name='bin' type='astring'
                           value='/usr/postgres/8.2/bin' />
                    <propval name='data' type='astring'
                           value='/var/postgres/8.2/data' />
                    <propval name='log' type='astring'
               value='server.log' />
            <propval name='value_authorization' type='astring'
               value='solaris.smf.value.postgres' />
            </property_group>

        </instance>

        <stability value='Evolving' />

        <template>
                <common_name>
                        <loctext xml:lang='C'>
                                PostgreSQL RDBMS
                        </loctext>
                </common_name>
                <documentation>
                        <manpage title='postgres_82' section='1' />
                        <doc_link name='postgresql.org'
                                uri='http://postgresql.org' />
                </documentation>
        </template>

</service>

</service_bundle>


评论[0]

Solaris的日志后台守护程序syslogd

09:22下午 一月 12, 2008 in category Solaris by 快快播谷

 语法:/usr/sbin/syslogd [-d] [-f configfile] [-m markinterval] [-p path] [-t | -T]

  syslogd读取和传递系统信息到相应的日志文件或者用户,依赖于信息的优先权和产生它的系统程序。配置文件/etc/syslog.conf控制信息传递到哪里。syslog每标记间隔/分钟以优先级LOG_INFO(默认是20)记录一个标记(时间戳)信息到设备,它的名字在syslog.conf文件中作为mark给出。 

  系统信息包含一个单行文本,使用<优先级代码>作为前缀,优先级在 <sys/syslog.h>中定义。syslogd从STREAMS日志驱动中读取,/dev/log,从/etc/netconfig, /etc/net/transport/hosts,和 /etc/net/transport/services里指定的任一传输提供者。

  syslogd在启动时读取配置文件,或者再次读取当其受到一个HUP信号,在此时它也关闭它打开的所有文件,重新读取其配置文件,然后仅打开在配置文件中列出的日志文件,当收到TERM信号syslogd退出。 

  在它启动时,syslogd创建/var/run/syslog.pid文件,如果可能,它包含它的进程标示符(PID)。

选项

      -d 打开调试模式。这个选项仅以交互模式用在一个root shell里,当系统在多用户模式时。它不能用在系统启动脚本里,这将会导致系统在syslogd启动的地方挂起。
      -f configfile 指定一个配置文件。
      -m markinterval 指定一个间隔,单位分钟,在标记信息之间。
      -p path 指定一个可替换的日志设备名称。默认是 /dev/log。
      -T 启用syslogd UDP端口,来打开远程信息记录。这个是默认的行为。
      -t 禁用syslogd UDP端口,关闭远程信息记录。 

评论[0]

Solaris下FTP限制用户在自己的主目录

02:15下午 一月 11, 2008 in category General by 快快播谷

Solaris 10 X86自带的FTP是改进的WU-FTPD。例子配置文件如下:

# ident    "@(#)ftpaccess    1.2    03/05/14 SMI"
#
# FTP server configuration file, see ftpaccess(4).
#

class        realusers    real        *
class        guestusers    guest        *
class        anonusers    anonymous    *

loginfails    3
passwd-check    trivial        warn
private        no
shutdown    /etc/ftpd/shutdown.msg
# email        user@hostname
# guestuser    username
# rhostlookup    no

keepalive    yes
recvbuf        65536        real,guest,anonymous
sendbuf        65536        real,guest,anonymous
# flush-wait    no        anonymous
# passive    ports        0.0.0.0/0    32768    65535
# timeout    data        600
# timeout    idle        300

banner        /etc/ftpd/banner.msg
greeting    brief
message        /etc/ftpd/welcome.msg    login
message        .message        cwd=*
readme        README*            login
readme        README*            cwd=*
# quota-info    *

chmod        no        anonymous
delete        no        anonymous
overwrite    no        anonymous
rename        no        anonymous
umask        no        anonymous

compress    yes        realusers guestusers anonusers
tar        yes        realusers guestusers anonusers

path-filter    guest,anonymous    /etc/ftpd/filename.msg    ^[[:alnum:]._-]*$ ^[.-]

noretrieve    relative    class=anonusers        /
allow-retrieve    relative    class=anonusers        /pub

upload        class=anonusers    *    *      no  nodirs
# upload    class=anonusers    *    /incoming yes ftpadm ftpadm 0440 nodirs

# log        commands    real,guest,anonymous
# log        security    real,guest,anonymous
# log        transfers    real,guest,anonymous    inbound,outbound
# xferlog    format    %T %Xt %R %Xn %XP %Xy %Xf %Xd %Xm %U ftp %Xa %u %Xc %Xs %Xr

# limit-time    anonymous    30
# limit        anonusers    10    Wk0730-1800      /etc/ftpd/toomany.msg
# limit        anonusers    50    SaSu|Any1800-0730 /etc/ftpd/toomany.msg
restricted-uid    *
defumask    077    realusers    guestusers    anonusers

最后面的 restricted-uid    * 会把FTP用户目录限制在自己的主目录。

如果你安装的是VSFTPD,例子文件如下:

listen=YES
# Example config file /etc/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=YES
#
# 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
#
# Activate logging of uploads/downloads.
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
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format
#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 NetJSP 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
#

chroot_local_user=YES

# 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

userlist_enable=yes
userlist_deny=yes
userlist_file=/etc/vsftpd.ftpusers

pasv_enable=yes
pasv_min_port=10001
pasv_max_port=10500

 

其中chroot_local_user=YES会把FTP用户限制在其主目录。

 

评论[0]

冬天终于要过去了

10:55上午 一月 11, 2008 in category General by 快快播谷

现在全球变暖,沈阳的冬天也不是很冷了,最冷夜晚也就是零下20多度。和小时候比起来就是雪下得少了,一年也没几场雪,下了基本也存不了多少。不过去年的正月十五的暴风雪还是记忆犹新,那个大啊,北风那个呼呼地刮啊,你能走50米就算你厉害。在过30来天就是春节了,有钱没钱还是回家过年,一定回家,哈哈。过了春节天气就不会太冷了,没事可以出去散心了。这样的冬天过够了,沈阳本身就没几个地方可玩。这一冷,就更没地方去了,每天都是在室内,憋死人了。终于快过去了,解放了!

评论[0]

推荐几个较好的基于Jsp的开源Web程序

11:26上午 一月 09, 2008 in category Java by 快快播谷

博客 Roller http://roller.apache.org

论坛 JForum http://www.jforum.net

网上商城 TurboShop http://www.turboshop.cn

内容管理系统 OpenCMS http://www.opencms.org/

评论[0]