I have a .sh script within a folder, and I'm using Azure DevOps to generate a tar.gz file that has that shell script.
Sample Folder Structure
main_folder/boot.sh
I'm using the ArchiveFiles@2
task found within Azure DevOps to create that archive, with the following settings:
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: "main_folder"
includeRootFolder: false
archiveType: "tar"
tarCompression: "gz"
archiveFile: "$(Build.StagingDirectory)/update.tar.gz
replaceExistingArchive: true
However, after I release this build and extract the tar.gz on my Linux system, when I try to run boot.sh
it says that permission is denied and I have to use chmod u=rwx boot.sh
to add the "execute" permission. Is there some way to check how Azure DevOps determines what permissions are added/removed when archiving?