Samba 局域网文件共享无法编辑 html 后缀的文件

2019-04-01 01:40:17 +08:00
 KasuganoSoras

在 CentOS 7 服务器上安装了 Samba,开启局域网文件共享,结果发现一个问题,所有 html 后缀的文件都不能编辑。

例如一个文件 index.html,修改后保存会提示这个:

即使以管理员权限启动 Notepad++ 依然无法保存,换其他编辑器也是相同情况。

但是如果把它重命名为 index.php 或者其他后缀就可以正常保存。

有大佬知道这是什么原因吗?

附上 Samba 配置文件:

# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.

[global]
	workgroup = SAMBA
	security = user

	passdb backend = tdbsam

	printing = cups
	printcap name = cups
	load printers = yes
	cups options = raw

[homes]
	comment = Home Directories
	valid users = %S, %D%w%S
	browseable = No
	read only = No
	inherit acls = Yes

[printers]
	comment = All Printers
	path = /var/tmp
	printable = Yes
	create mask = 0600
	browseable = No

[print$]
	comment = Printer Drivers
	path = /var/lib/samba/drivers
	write list = @printadmin root
	force group = @printadmin
	create mask = 0664
	directory mask = 0775

[rootfs]
	writeable = yes
	locking = no
	path = /
	force directory mode = 755
	force group = root
	force create mode = 755
	revalidate = yes
	force user = root
1027 次点击
所在节点    问与答
2 条回复
OscarUsingChen
2019-04-01 06:27:55 +08:00
KasuganoSoras
2019-04-01 07:12:59 +08:00
@OscarUsingChen Soga,原来是这个问题,一直没想到

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/550652

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX