centos7.6+samba+設置可讀可寫不可刪權限


samba原文

https://www.cnblogs.com/muscleape/p/6385583.html

設置可讀可寫不可刪權限原文:

https://blog.51cto.com/guanhaizhan/2090396

mkdir -m 777 /share

[public]
path = /share
writable = yes
create mask = 1444
directory mask = 1777

需求要求可讀可寫不可刪:

1、關閉防火牆

2、關閉SeLinux

3、yum install samba

service smb status

systemctl status smb

systemctl start smb

設置smb開機啟動

systemctl enable smb

Samba的主配置文件為/etc/samba/smb.conf

請注意,配置文件前面必須用空格,不可以用tab鍵

#======================= Global Settings =====================================

[global]

# ----------------------- Network Related Options -------------------------
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostname

        workgroup = WORKGROUP
        server string = LBALY Samba Server Version %v
        netbios name = LBALYSamba
        interfaces = eth0
        max connections = 0
        deadtime = 0

# --------------------------- Logging Options -----------------------------
#
# Log File let you specify where to put logs and how to split them up.

        log file = /var/log/samba/log.%m
        max log size = 50
# ----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)

        security = user
        map to guest = Bad User

#============================ Share Definitions ==============================

[public]
        comment = Public Stuff
        path = /share
        public = yes
        writable = yes
        create mask = 1444
        directory mask = 1777

 


免責聲明!

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



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