Fix samba share file caching problem
This commit is contained in:
parent
2c33ad6042
commit
6781e50a27
@ -29,6 +29,7 @@ then
|
||||
force create mode = 777
|
||||
directory mask = 777
|
||||
force directory mode = 777
|
||||
oplocks = yes
|
||||
[/$REALUSER-www]
|
||||
EOT
|
||||
fi
|
||||
@ -49,6 +50,7 @@ EOT
|
||||
force group = root
|
||||
writeable = yes
|
||||
admin users = root
|
||||
oplocks = yes
|
||||
[/www]
|
||||
EOT
|
||||
fi
|
||||
@ -69,10 +71,16 @@ EOT
|
||||
force group = root
|
||||
writeable = yes
|
||||
admin users = root
|
||||
oplocks = yes
|
||||
[/apache2]
|
||||
EOT
|
||||
fi
|
||||
sed -i -e 's/obey pam restrictions = yes/obey pam restrictions = no/g' /etc/samba/smb.conf
|
||||
# https://www.oreilly.com/openbook/samba/book/ch05_05.html
|
||||
# https://unix.stackexchange.com/questions/425934/windows-clients-will-not-refresh-linux-samba-file-locally-if-reading-file-at-int
|
||||
# Add kernel oplocks = yes under [global]
|
||||
sed -i '/kernel oplocks/d' /etc/samba/smb.conf
|
||||
sed -i '/\[global\]/a kernel oplocks = yes' /etc/samba/smb.conf
|
||||
service smbd restart 2>>install.log &&
|
||||
ufw allow samba 2>>install.log
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user