sudo apt-get install samba
sudo useradd share # the user name is "share" sudo smbpasswd -a share
ossfs xxx data/ -ourl=oss-cn-xxx.aliyuncs.com -o allow_other
append below configuration to /etc/samba/smb.conf
[share] available = yes browseable = yes path = /home/joybb/share create mask = 0777 directory mask = 0777 valid users = share force user = nobody force group = nogroup public = yes writable = yes available = yes
sudo /etc/init.d/smbd restart
Samba服务所使用的端口和协议:
1)Port 137 (UDP) - NetBIOS 名字服务 ; nmbd
2)Port 138 (UDP) - NetBIOS 数据报服务
3)Port 139 (TCP) - 文件和打印共享 ; smbd (基于SMB(Server Message Block)协议,主要在局域网中使用,文件共享协议)
4)Port 389 (TCP) - 用于 LDAP (Active Directory Mode)
5)Port 445 (TCP) - NetBIOS服务在windos 2000及以后版本使用此端口, (Common Internet File System,CIFS,它是SMB协议扩展到Internet后,实现Internet文件共享)
6)Port 901 (TCP) - 用于 SWAT,用于网页管理Samba