Samba 用户无法写入其他用户创建的文件夹

Samba 用户无法写入其他用户创建的文件夹

如果某个用户创建了一个文件夹,其他用户则无权写入该文件夹。我该如何解决这个问题?

#======================= Global Settings =======================
[global]
create mask =0777
directory mask = 0777
workgroup = ENERJIK
server string = %h server (Samba, Ubuntu)
   dns proxy = no
#### Debugging/Accounting ####
   log file = /var/log/samba/log.%m
   max log size = 1000
  syslog = 0
  panic action = /usr/share/samba/panic-action %d
####### Authentication #######
   server role = standalone server
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n 
   map to guest = bad user
############ Misc ############
   usershare allow guests = yes
#======================= Share Definitions =======================
 [printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no

[Aylik Denetim Bilgisi]
   comment = Enerjik Yapı Denetim Dosya Paylaşım Alanı
   path = /media/depo/Aylikdenetimbilgisi
   browseable = yes
   write list = emre fatmanur ulfet
   guest ok = no

[Çalışan Takip]
   comment = Enerjik Yapı Denetim Dosya Paylaşım Alanı
   path = /media/depo/Calisantakip
   browseable = yes
   write list = emre fatmanur ulfet
   guest ok = no

[Inşaat Takip]
   comment = Enerjik Yapı Denetim Dosya Paylaşım Alanı
   path = /media/depo/Insaattakip
   create mask = 0777
   directory mask = 0777
   browseable = yes
   write list = emre fatmanur ulfet
   guest ok = no


[Ruhsatlı Projeler]
   comment = Enerjik Yapı Denetim Dosya Paylaşım Alanı
   path = /media/depo/Ruhsatliprojeler
   browseable = yes
   write list = emre murat eren servet nuri
   guest ok = no

[Enerjik]
   comment = Enerjik Yapı Denetim Dosya Paylaşım Alanı
   path = /media/depo/EnerjikYD
   browseable = yes
   write list = emre ulfet fatmanur
   valid users = emre ulfet fatmanur
   create mask = 0777
   directory mask = 0777
   guest ok = no
[c$]
   comment = Kök dizin paylaşımı
   path = /
   browseable = no
   read only = no
   write list = root

答案1

create mask仅定义文件的最大权限可以创建。如果 Windows 用户使用 0750 创建文件,则该权限将应用于您的设置,因为它是按位 AND 运算的。您可能希望将您的设置与该force (directory) create mode = 0777设置相结合。

更多信息请查看man 5 smb.confhttps://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#CREATEMASK

答案2

我认为问题的原因是用户权限。当我使用 Active Control List (如何设置文件夹以便其中创建的任何内容都继承权限?),问题已得到部分解决。但是现在如果一个用户创建了一个文件夹,其他人无法删除它,但可以写入。

相关内容