Permissions

Samba 寫訪問問題:即使在 smb.conf 中,參數也不顯示在 testparm 中

  • February 26, 2019

我正在嘗試獲取 samba 共享設置,以便使用者同時擁有讀取和寫入權限。我認為我可以通過編輯 /etc/samba/smb.conf 來添加我的共享,如下所示:

[CLOUD]
  path = /cloud
  writable = yes
  security = user
  valid users = neon, win
  write list = neon, win

然後執行:

$ sudo systemctl restart smb.service
$ sudo systemctl restart nmb.service

我可以從這兩個帳戶訪問我的共享,但都不能寫。當我執行 testparam 時,一些參數失去(securitywritable),但沒有明確的錯誤。

rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[CLOUD]"
Global parameter security found in service section!
Loaded services file OK.
Server role: ROLE_STANDALONE


Press enter to see a dump of your service definitions

# Global parameters
[global]
   dns proxy = No
   log file = /usr/local/samba/var/log.%m
   max log size = 50
   server role = standalone server
   server string = Samba Server
   workgroup = MYGROUP
   idmap config * : backend = tdb


[homes]
   browseable = No
   comment = Home Directories
   read only = No


[printers]
   browseable = No
   comment = All Printers
   path = /usr/spool/samba
   printable = Yes


[CLOUD]
   path = /cloud
   read only = No
   valid users = neon win
   write list = neon win

我認為這意味著該writable = yes參數未被辨識,但由於沒有錯誤,我不知道為什麼。關於這裡可能發生的事情有什麼建議嗎?我正在使用拱門。

試試這個:

[CLOUD]
   writeable = yes
   path = /cloud
   valid users = neon,win

重啟smbd

當您以使用者 neon 或 win 登錄時,還可以直接在 Linux 系統中檢查讀/寫權限。

我經常不得不在 Windows 中再次登出/登入

引用自:https://unix.stackexchange.com/questions/503102