“CentOS服务搭建-02-samba文件服务”的版本间的差异

来自DeerGrove Wiki
跳转至: 导航搜索
第6行: 第6行:
 
#: sudo vi /etc/samba/smb.conf
 
#: sudo vi /etc/samba/smb.conf
 
#: [rpi_web_notebooks]
 
#: [rpi_web_notebooks]
* comment = 树莓派jupyter notebook目录
+
## comment = 树莓派jupyter notebook目录
* path = /home/pi/web_notebooks
+
## path = /home/pi/web_notebooks
* browseable = Yes
+
## browseable = Yes
* read only = No
+
## read only = No
* public = yes
+
## public = yes
* guest ok = yes
+
## guest ok = yes
* writable = yes
+
## writable = yes
* create mask = 0777
+
## create mask = 0777
* directory mask = 0777
+
## directory mask = 0777
 
# 启动samba服务并设置自启动:
 
# 启动samba服务并设置自启动:
 
#: sudo systemctl start smb
 
#: sudo systemctl start smb

2019年9月26日 (四) 15:30的版本


  1. 安装samba:
    sudo yum install samba
  2. 配置samba共享目录
    sudo vi /etc/samba/smb.conf
    [rpi_web_notebooks]
    1. comment = 树莓派jupyter notebook目录
    2. path = /home/pi/web_notebooks
    3. browseable = Yes
    4. read only = No
    5. public = yes
    6. guest ok = yes
    7. writable = yes
    8. create mask = 0777
    9. directory mask = 0777
  3. 启动samba服务并设置自启动:
    sudo systemctl start smb
    sudo systemctl enable smb
    sudo systemctl status smb
  4. 修改防火墙:
    sudo firewall-cmd --zone=public --add-port=139/tcp --permanent
    sudo firewall-cmd --zone=public --add-port=445/tcp --permanent
    sudo firewall-cmd --zone=public --add-port=137/udp --permanent
    sudo firewall-cmd --zone=public --add-port=138/udp --permanent
    sudo firewall-cmd --reload
    sudo systemctl restart firewalld.service