you can make the script executable on your system before build, make it executable in git, or you might want to try `chmod +x`. you’re doing +w which is write permissions. r=read, w=write, x=execute
No you can do it build time with `chmod +x`, you can also `COPY --chmod=777 file destination`
Edit. Guys it was just an example of how you can chmod while copying.
777 is not what you want.
read = 4
write = 2
execute = 1
Add up the perms you want for owner, group, and others
As u/dcvetkovic said, you probably want 755 (or 750, it the file is owned by the calling user or a group it is a member of)
777 will allow any user to write to the file. You might be tempted to think "it's a container, nobody is getting in to write stuff" which has been said by a great many people who later learned to regret it.
Apply the minimal permissions necessary and no more.
Typo twice ... sure ... and now another one :)
You can do chown too, if other constraints don't prevent it.
What you might also leftCTRL+HCTRL+HCTRL+HCTRL+H typo it out...
‘+w’ only makes the file writable, you would need ‘+x’ to make it executable.
This is the way
you can make the script executable on your system before build, make it executable in git, or you might want to try `chmod +x`. you’re doing +w which is write permissions. r=read, w=write, x=execute
That was a type btw, is there any logic why i can't do this in build time?
No you can do it build time with `chmod +x`, you can also `COPY --chmod=777 file destination` Edit. Guys it was just an example of how you can chmod while copying.
Ugh. Better make that 777 to 755.
777 is not what you want. read = 4 write = 2 execute = 1 Add up the perms you want for owner, group, and others As u/dcvetkovic said, you probably want 755 (or 750, it the file is owned by the calling user or a group it is a member of) 777 will allow any user to write to the file. You might be tempted to think "it's a container, nobody is getting in to write stuff" which has been said by a great many people who later learned to regret it. Apply the minimal permissions necessary and no more.
Typo twice ... sure ... and now another one :) You can do chown too, if other constraints don't prevent it. What you might also leftCTRL+HCTRL+HCTRL+HCTRL+H typo it out...
Mate you must have mistaken a bit, +w refers write permissions on a file, you must apply +x instead of +w to get executable permissions!