ubuntu samba 性能优化和匿名访问

来源:互联网 发布:网络评选投票 编辑:程序博客网 时间:2024/06/08 17:00

用低功耗电影装ubuntu server做家用NAS。
先贴smb.conf:
[global]workgroup = WORKGROUPnetbios name = DiskStationserver string = DiskStation max connections = 0deadtime = 10log file = /var/log/samba/log.%mmax log size = 50security = usermap to guest = bad userencrypt passwords = yesguest account = nobodyguest ok = yes admin users = rootload printers = no printing = bsd printcap name = /dev/null disable spoolss = yes follow symlinks = nowide links = no# enable some read/write tuningaio read size = 16384aio write size = 16384aio write behind = truewrite cache size = 2097152max xmit = 65536large readwrite = yes# Use sendfile for reading files efficientlyuse sendfile = yesmin receivefile size = 16384getwd cache = true[disk1]    comment = disk1    path = /mnt/disk1    browseable = yes    writable = yes    valid users = nobody admin    public = yes    guest ok = yes

如果两端硬盘都不是屏颈的时候,atom d525 CPU达到100%占用,最高速度可以达到700Mbps。

几个要点:

security = usermap to guest = bad userguest account = nobody


网上的security = share是不正确的配置

想控制某个share里面的某些目录是否可以被guest访问,就使用目录的权限来控制
755和744分别是可以guest可以访问和不可以访问,即目录的执行权限控制guest是否可以进入。

0 0