You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Say that tpkg a writes a file to /home/t/etc/a
Say that tpkg b writes a file to /home/t/etc/b
Tpkg a specifies:
file_defaults:
posix:
owner: t
group: roleusers
Tpkg b specifies (or has no file_defaults):
file_defaults:
Tpkg a is installed first. Ownership of the /home/t and /home/t/etc are now set to t:roleusers
Tpkg b is installed second. Ownership of /home/t is now root:root and /home/t/etc is now owned by root:root
The text was updated successfully, but these errors were encountered:
That's a bug. There's logic in the unpack method such that existing files and directories overwritten by a package install should be left with their previous permissions and ownership, unless the new package has specific permissions and ownership for that particular file.
I.e. the precedence for deciding what permissions to apply to a file being installed are:
Package has specific perms for that file
File already exists, use existing perms
Use file_defaults from package
You can look for the comment that starts with the line "Reset the permission/ownership of the conflicting files as how they were before." if you want to inspect the code that should be doing this.
Reported by Raymond Barbiero via email:
Say that tpkg a writes a file to /home/t/etc/a
Say that tpkg b writes a file to /home/t/etc/b
Tpkg a specifies:
file_defaults:
posix:
owner: t
group: roleusers
Tpkg b specifies (or has no file_defaults):
file_defaults:
Tpkg a is installed first. Ownership of the /home/t and /home/t/etc are now set to t:roleusers
Tpkg b is installed second. Ownership of /home/t is now root:root and /home/t/etc is now owned by root:root
The text was updated successfully, but these errors were encountered: