samba配置只讀和可以寫入的共享


編輯smb.conf

1.在[global]中 

找到  

security = 

將其改為  

security = share

 

2. 在文件中加入自定義的共享目錄

      [attachment]
        path=/data/attachment
        public = yes
        only guest = no
 writable = yes \\允許寫入

 

3.重啟samba

service smb restart

 

--可寫的共享

在smb.cnf 中添加結點,配置如下:

[data]

        comment = share file
        path=/data/share
        public = yes
        only guest = no
        writable = yes

 

然后將共享的目錄權限設為777

chmod 777 /data/share

 

關閉SELIUNX:

[root@bogon samba]# getenforce
Enforcing
[root@bogon samba]# setenforce 0
[root@bogon samba]# getenforce
Permissive

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM