Hi,

I ran into a problem with the latest ptxdist 2020.06 when trying to install an 
ssh key to
"/root/.ssh/authorized_keys".

--8<--------------------

#> ptxdist images

... # output skipped

Incompatible ownership or permissions for '/root':
image-enhancements: 0.0 0755 (implicit)
rootfs: 0.0 0700
One of these packages must be fixed!

-------------------->8--

Here, the "image-enhancements rule" contains the following code which breaks 
the image creation:

    @$(call install_copy, image_enhancements, 0, 0, 0400, 
$(PTXDIST_PLATFORMCONFIGDIR)/access/key-develop_id_ed25519.pub, 
/root/.ssh/authorized_keys )

I found the code in "scripts/lib/ptxd_lib_check_dir_permissions.awk" to be 
responsible for this
issue. In this file the directory permissions are hardcoded. The following 
"patch" is my current
workaround for this problem:

--8<--------------------

diff --git a/scripts/lib/ptxd_lib_check_dir_permissions.awk 
b/scripts/lib/ptxd_lib_check_dir_permissions.awk
index 9bd009f04..4ad132561 100644 --- a/scripts/lib/ptxd_lib_check_dir_permissions.awk +++ b/scripts/lib/ptxd_lib_check_dir_permissions.awk @@ -33,6 +33,9 @@ $1 ~ "f" { path = gensub(/\/[^/]*$/,"",1,path) if (path == "") break; - check(path, "0.0 0755", 1) + if (path == "/root") + check(path, "0.0 0700", 1) + else + check(path, "0.0 0755", 1) } }
-------------------->8--

What would be a proper solution to this problem?

_______________________________________________
ptxdist mailing list
[email protected]
To unsubscribe, send a mail with subject "unsubscribe" to 
[email protected]

Reply via email to