Created 星期六 24 三月 2012
windows 共享linux文件
安装samba
将系统用户xun作为smb用户而设定密码
#smbpasswd -a xun
添加共享文夹
在/etc/samba/smb.conf的 Share Definitions中添加
[tmp]
comment=tmp
path=/home/tmp
guest ok=no
read only=no
share modes=yes
运行testparm测试
#testparm
如果security为users,有可能别的机器没权限访问。
security = domain
对于无法查看工作组,可试试重启samba。
网页
安装apache2,
配置
在sites-enabled中编辑
根目录
<Directory />
AllowOverride None
<Directory /home/xun/lab/www/>
AllowOverride None
Order allow,deny
allow from all
cgi-bin
ScriptAlias /cgi-bin/ /home/xun/lab/www/cgi-bin/ <Directory "/home/xun/lab/www/cgi-bin/"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory>
目录配置中可能还要加上
配置目录特性
定义目录特性选限 Options
可选参数
Indexes :目录允许“目录浏览
MultiViews: 目录允许内容协商的多重试图
All: 包含除了MultiViews外的所有特性
ExecCGI: 允许在该目录下执行CGI脚本
FollowSymLinks 允许使用符号链接
目录权限
可以通过.htacess文件设置目录的权限,
AcessFileName .hacess
配置参数AllowOverride 指定目录.htacess文件中的指令类型.一般将AllowOverride设置为"None",禁止使用.htacess文件,当AllowOverride为All时,
.htacess文件可以覆盖任何以前的配置
使用Order选项定义访问权限
允许所有客户机的访问
允许网段192.168.99.0/24访问,但IP地址为192.168.99.254这个客户机除外:
Allow from 192.168.99.0/24
Deny from 192.168.99.254
Alias /doc/ "/usr/share/doc/"
启动
apache2ctl start
FTP
安装 profptd