V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
KasuganoSoras
V2EX  ›  问与答

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

  •  
  •   KasuganoSoras · 2019-04-01 01:40:17 +08:00 · 1019 次点击
    这是一个创建于 1858 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

    img

    即使以管理员权限启动 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
    
    2 条回复    2019-04-01 07:12:59 +08:00
    OscarUsingChen
        1
    OscarUsingChen  
       2019-04-01 06:27:55 +08:00   ❤️ 2
    KasuganoSoras
        2
    KasuganoSoras  
    OP
       2019-04-01 07:12:59 +08:00
    @OscarUsingChen Soga,原来是这个问题,一直没想到
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   816 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 20:05 · PVG 04:05 · LAX 13:05 · JFK 16:05
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.