Skip to content

Preserve UID/GID when placing files#6

Merged
JPedroBorges merged 1 commit intomainfrom
add-ownership-management
Mar 8, 2026
Merged

Preserve UID/GID when placing files#6
JPedroBorges merged 1 commit intomainfrom
add-ownership-management

Conversation

@JPedroBorges
Copy link
Member

Introduce chownLike to read UID/GID from the source (using syscall.Stat_t) and apply it via os.Lchown. Use this to set ownership on created parent directories, copied files/dirs, hardlink-created dirs, and symlink targets. Also improve error handling around MkdirAll, copy and symlink operations.

Introduce chownLike to read UID/GID from the source (using syscall.Stat_t) and apply it via os.Lchown. Use this to set ownership on created parent directories, copied files/dirs, hardlink-created dirs, and symlink targets. Also improve error handling around MkdirAll, copy and symlink operations.
@JPedroBorges JPedroBorges added the enhancement New feature or request label Mar 8, 2026
@JPedroBorges JPedroBorges merged commit 6a22843 into main Mar 8, 2026
2 checks passed
@JPedroBorges JPedroBorges deleted the add-ownership-management branch March 8, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant