mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #4207] [MERGED] Fix overly permissive file permissions (os.ModePerm / 0777) #5627
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#5627
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/4207
Author: @hobostay
Created: 5/10/2026
Status: ✅ Merged
Merged: 5/10/2026
Merged by: @MHSanaei
Base:
main← Head:fix/file-permissions📝 Commits (1)
492188dFix overly permissive file permissions (os.ModePerm)📊 Changes
3 files changed (+4 additions, -7 deletions)
View changed files
📝
database/db.go(+1 -2)📝
web/service/server.go(+1 -2)📝
xray/process.go(+2 -3)📄 Description
Summary
os.ModePerm/fs.ModePerm(0777) with appropriate restrictive permissions across four file operations"io/fs"imports from the affected filesChanges
database/db.goxray/process.goxray/process.goweb/service/server.goWhy
os.ModePerm(0777) makes files and directories world-writable, violating the principle of least privilege. An attacker with local access could modify the Xray configuration file or crash reports, or inject malicious binaries.Test plan
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.