问题原文
原帖链接 · Paris Finley · CC BY-SA 4.0
On our Centos 7 server, I added create mask = 770 to my smb.conf in order to force permissions on the files our Windows users store in a directory. Then from the command line, I entered the following:
# systemctl restart smb.service
# systemctl restart nmb.service
...but the files were not saved with the right permissions. They were saved correctly after a reboot. So what happened in the reboot that (maybe) I could have done from the command line?
Here's the section of the smb.conf:
[image-storage]
comment = archived image location
path = /our/samba/path/to/image_storage
valid users = @NameOfOurGroup
create mask = 770
browsable = yes
writable = yes
guest ok = no
force user = imagestore
社区高分解答
原帖链接 · Bill Huneke · CC BY-SA 4.0
Restarting just the service seems like an improvement on rebooting. Even better still is to make use of the config reload that comes with many linux services, including Samba. This feature is often accessed with a SIGHUP signal or via a control program.
Use smbcontrol (man page) to reload the config with the lowest downtime and lowest-possible impact on services already using your shares. So, just run this:
smbcontrol smbd reload-config
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
