ubuntu samba 性能优化和匿名访问

用低功耗电影装ubuntu server做家用NAS。

先贴smb.conf:

[global]

workgroup = WORKGROUP
netbios name = DiskStation
server string = DiskStation 
max connections = 0
deadtime = 10
log file = /var/log/samba/log.%m
max log size = 50
security = user
map to guest = bad user
encrypt passwords = yes
guest account = nobody
guest ok = yes 
admin users = root

load printers = no 
printing = bsd 
printcap name = /dev/null 
disable spoolss = yes 

follow symlinks = no
wide links = no
# enable some read/write tuning
aio read size = 16384
aio write size = 16384
aio write behind = true
write cache size = 2097152
max xmit = 65536
large readwrite = yes

# Use sendfile for reading files efficiently
use sendfile = yes
min receivefile size = 16384
getwd 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 = user
map to guest = bad user
guest account = nobody

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

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

你可能感兴趣的:(ubuntu samba 性能优化和匿名访问)