IT Information/IT Tips ๐Ÿฏ

[Mac] zsh: permission denied ์›์ธ ๋ฐ ํ•ด๊ฒฐ๋ฐฉ๋ฒ•

yuri lee 2023. 9. 7. 22:03
๋ฐ˜์‘ํ˜•

Intro

sh ํŒŒ์ผ์„ ์‹คํ–‰ํ•˜๋˜ ๋„์ค‘ ๋‹ค์Œ์˜ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. 

 

zsh: permission denied

 

How to solve

ํŒŒ์ผ ๊ถŒํ•œ์„ ํ™•์ธํ•ด๋ณด๋‹ˆ, ์‹คํ–‰๊ถŒํ•œ(x)์ด ์—†์—ˆ์Šต๋‹ˆ๋‹ค. ์ด๋Ÿด ๋•Œ๋Š” ์•„๋ž˜์˜ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์‹คํ–‰๊ถŒํ•œ์„ ์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค. 

 

chmod +x ./demo.sh

 

์ฐธ๊ณ ๋กœ chmod๋Š” change mode๋ผ๋Š” ๋œป์œผ๋กœ, ํŒŒ์ผ ๋ฐ ๋””๋ ‰ํ† ๋ฆฌ์˜ ๊ถŒํ•œ์„ ๋ฐ”๊ฟ”์ค๋‹ˆ๋‹ค. ls-al ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๊ถŒํ•œ์„ ์กฐํšŒํ•ด๋ณด๋ฉด ๋‹ฌ๋ผ์ง„ ๊ถŒํ•œ์„ ํ™•์ธํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. 

๋ฐ˜์‘ํ˜•