Wrong permissions if deploying custom file with bakery

Hi,

I found a problem while deploying custom files with the bakery.

If I deploy a plugin for example ibm_mq with the bakery the permission on the target server are 0755.
-rwxr-xr-x. 1 root root 2902 4. Nov 09:52 ibm_mq

But if I deploy a custom file then the permission are 0751 allthough the source file ist 0755. This is no problem if the plugin runs with root user. But if you have a plugins which calls it self to use a non root user then you get “permission denied”.

-rwxr-x–x. 1 root root 5590 11. Nov 10:40 sas_status_as

Is this a bug, or the expected behaviour.

Regards
Christoph

Hello,

I guess its a security feature.

Maybe change your code in a way that you run it with su and HEREDOC:

su "${USER}" -c /usr/bin/bash << EOF
<your code>
EOF

regards

Michael