修正飞牛继承ACL并保留部署中止证据
这个提交包含在:
1 父节点
a20f1e674f
当前提交
0f3f14522c
3 个文件已更改
+99
-1
没有与搜索条件相匹配的文件
@@ -42,6 +42,16 @@ def clone(original, destination, expected):
|
||||
fd=os.open(str(destination),os.O_CREAT|os.O_EXCL|os.O_WRONLY,0o600)
|
||||
os.close(fd)
|
||||
shutil.copy2(original,destination)
|
||||
if (destination.stat().st_uid,destination.stat().st_gid)!=(expected['uid'],expected['gid']):
|
||||
os.chown(destination,expected['uid'],expected['gid'])
|
||||
if stat.S_IMODE(destination.stat().st_mode)!=int(expected['mode'],8):
|
||||
os.chmod(destination,int(expected['mode'],8))
|
||||
# fnOS creates a system.trim_acl inherited from the parent even when the
|
||||
# original has none. copy2 does not remove these destination-only xattrs.
|
||||
for key in set(os.listxattr(destination))-set(expected['xattrs']):
|
||||
os.removexattr(destination,key)
|
||||
for key,value in expected['xattrs'].items():
|
||||
os.setxattr(destination,key,base64.b64decode(value))
|
||||
assert metadata(destination)==expected, 'Native metadata copy mismatch'
|
||||
with destination.open('rb') as f: os.fsync(f.fileno())
|
||||
stamp=datetime.datetime.now(datetime.timezone(datetime.timedelta(hours=8))).strftime('%Y%m%d%H%M')
|
||||
@@ -195,7 +205,10 @@ def main():
|
||||
assert outcome['ok'], json.dumps(outcome,ensure_ascii=False)
|
||||
print(json.dumps(dict(deployed=len(results), files=results), ensure_ascii=False, indent=2))
|
||||
finally:
|
||||
shutil.rmtree(lock)
|
||||
def ignore_missing(function, path, exception):
|
||||
if not isinstance(exception[1], FileNotFoundError):
|
||||
raise exception[1]
|
||||
shutil.rmtree(lock, onerror=ignore_missing)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"checkedAt": "2026-11-12T17:20:58.623934+00:00",
|
||||
"sourceCommit": "a20f1e674fcb28fd846ad6ad3531211a5466855f",
|
||||
"localProject": "/Volumes/备份/大鱼调色/大鱼调色/Backend",
|
||||
"nasRoot": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media",
|
||||
"files": [
|
||||
{
|
||||
"relativePath": "wp-content/themes/ripro5/inc/oauth/weixin/callback.php",
|
||||
"nativeTarget": "/vol1/1000/dayumedia/wwwroot/dayu_media/wp-content/themes/ripro5/inc/oauth/weixin/callback.php",
|
||||
"beforeSHA256": "29b07075bfc54e51d0b8c9653742d94e498216c1f97414e4c1ede5b469db6d9a",
|
||||
"sha256": "995f8b82216f594ab7dac5058b551dcffbc8cab830536e245d6ebdcf00e20ae4",
|
||||
"beforeMetadata": {
|
||||
"uid": 1000,
|
||||
"gid": 1001,
|
||||
"mode": "0o705",
|
||||
"xattrs": {
|
||||
"user.DOSATTRIB": "AAAFAAUAAAARAAAAIAAAAIAcKIV/a90B"
|
||||
}
|
||||
},
|
||||
"status": "pending",
|
||||
"target": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/themes/ripro5/inc/oauth/weixin/callback.php"
|
||||
},
|
||||
{
|
||||
"relativePath": "wp-content/mu-plugins/dayu-color-online-luts.php",
|
||||
"nativeTarget": "/vol1/1000/dayumedia/wwwroot/dayu_media/wp-content/mu-plugins/dayu-color-online-luts.php",
|
||||
"beforeSHA256": "7b749332efa94427eaa032a5acfe862fe2fd237c7a1d38bd76f16fabe8338871",
|
||||
"sha256": "c6133429b48fdec12a6f660fb214f81874d9fbf4174696c94944e6b217eb1ddf",
|
||||
"beforeMetadata": {
|
||||
"uid": 1000,
|
||||
"gid": 1001,
|
||||
"mode": "0o700",
|
||||
"xattrs": {
|
||||
"user.DOSATTRIB": "AAAFAAUAAAARAAAAIAAAAJDdjZDTcd0B"
|
||||
}
|
||||
},
|
||||
"status": "pending",
|
||||
"target": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/mu-plugins/dayu-color-online-luts.php"
|
||||
}
|
||||
],
|
||||
"nativeResult": {
|
||||
"ok": false,
|
||||
"files": [
|
||||
{
|
||||
"relativePath": "wp-content/themes/ripro5/inc/oauth/weixin/callback.php",
|
||||
"nativeTarget": "/vol1/1000/dayumedia/wwwroot/dayu_media/wp-content/themes/ripro5/inc/oauth/weixin/callback.php",
|
||||
"beforeSHA256": "29b07075bfc54e51d0b8c9653742d94e498216c1f97414e4c1ede5b469db6d9a",
|
||||
"sha256": "995f8b82216f594ab7dac5058b551dcffbc8cab830536e245d6ebdcf00e20ae4",
|
||||
"beforeMetadata": {
|
||||
"uid": 1000,
|
||||
"gid": 1001,
|
||||
"mode": "0o705",
|
||||
"xattrs": {
|
||||
"user.DOSATTRIB": "AAAFAAUAAAARAAAAIAAAAIAcKIV/a90B"
|
||||
}
|
||||
},
|
||||
"status": "pending",
|
||||
"target": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/themes/ripro5/inc/oauth/weixin/callback.php"
|
||||
},
|
||||
{
|
||||
"relativePath": "wp-content/mu-plugins/dayu-color-online-luts.php",
|
||||
"nativeTarget": "/vol1/1000/dayumedia/wwwroot/dayu_media/wp-content/mu-plugins/dayu-color-online-luts.php",
|
||||
"beforeSHA256": "7b749332efa94427eaa032a5acfe862fe2fd237c7a1d38bd76f16fabe8338871",
|
||||
"sha256": "c6133429b48fdec12a6f660fb214f81874d9fbf4174696c94944e6b217eb1ddf",
|
||||
"beforeMetadata": {
|
||||
"uid": 1000,
|
||||
"gid": 1001,
|
||||
"mode": "0o700",
|
||||
"xattrs": {
|
||||
"user.DOSATTRIB": "AAAFAAUAAAARAAAAIAAAAJDdjZDTcd0B"
|
||||
}
|
||||
},
|
||||
"status": "pending",
|
||||
"target": "/Volumes/dayumedia (存储空间1)/wwwroot/dayu_media/wp-content/mu-plugins/dayu-color-online-luts.php"
|
||||
}
|
||||
],
|
||||
"rolledBack": false,
|
||||
"error": "Native metadata copy mismatch",
|
||||
"rollbackErrors": []
|
||||
},
|
||||
"liveScanVerified": false,
|
||||
"status": "Stopped before replacement: fnOS copy2 added destination-only system.trim_acl; original production files unchanged",
|
||||
"resolvedBy": "Remove destination-only inherited xattrs on staged/backup files; verified clone of both actual production originals preserves bytes and exact native metadata"
|
||||
}
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
此前会话的目录及网络限制已解除:本会话实测 SMB 可列举、新建、重命名、删除测试目录,Git 已推送并回读 `d944ad86528783fc5c9d30bc2e71660f9524f155`;未修改 NAS 权限。生产两文件仍等于原基线。67 项隔离测试通过,使用合成 OAuth/账号,不加载生产配置。部署脚本改用原文件所有者的原生 SSH 原子替换,保留真实 UID/GID、权限及扩展属性;分别为 1000:1001、0705/0700,不采用 SMB 显示的合成模式。NAS 临时目录验证了正常部署、基线变化拒绝、第二文件失败后回滚三个场景,全部通过并清理临时文件。[部署安全检查](verification/WeChatDeploymentSafety.json)
|
||||
|
||||
第一次上线在替换前发现 fnOS 的 `copy2` 会产生源文件没有的 `system.trim_acl`,保护检查中止,生产两原件均未变;保留该次旁路备份。已修正仅清除新副本多出的继承属性,并在两个实际目标目录分别完成源文件复制及原生元数据一致检查,临时副本已清理。[中止记录](verification/WeChatLoginDeploymentAttempt1.json)
|
||||
|
||||
下一步:提交并推送部署工具检查点;通过 `python3 Backend/deploy_wechat_login.py --apply --ssh-control <已认证连接>` 上线,逐文件原目录旁路备份并核验摘要和原生元数据;验证服务器 PHP、实际 HTTP 会话拒绝响应。真实未绑定账号需发起全新扫码,旧拒绝会话不能用于验收。现有 Xcode 工程排序差异不归本轮,不暂存。
|
||||
|
||||
[原生产基线](verification/WeChatLoginBaseline.json) · [修复与67项检查](verification/WeChatLoginFix.json) · [当前可写预检](verification/WeChatLoginReady.json) · [此前受限会话历史](research/HandoffWeChatLogin-20261113-before-deployment.md)。本轮不修改 APP、安装包、Release、文章或更新通道。
|
||||
|
||||
在新工单中引用
屏蔽一个用户