Hi All,
I am using the Bash commands within Octopus for the first time and noticed that it is running as root as all files being created have the user root against them.
I have attempt to do both a “su MyUserName” at the start of the script and also attempt to add “sudo -u MyUserName” in front of my file copy commands
e.g. “sudo -u octopusUser cp -r “${targetdirectory_sv}/.” “${deploymentdir}sv/””
Keep in mind the script does a chown -R octopusUser $targetDirectory_Sv first to ensure that the files are already owned by OctopusUser prior to the cp, but the files in deploymentdir/sv are still coming across with the user of root.
Anybody have any suggestions?
Thanks,
Damien