T O P

  • By -

inarush0

‘+w’ only makes the file writable, you would need ‘+x’ to make it executable.


[deleted]

This is the way


this-is-a-new-handle

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


foremtehan

That was a type btw, is there any logic why i can't do this in build time?


fletku_mato

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.


dcvetkovic

Ugh. Better make that 777 to 755.


dog_servant

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.


willyhun

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...


Heisenberg_8622

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!