๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

chmod1

[Mac] zsh: permission denied: ./sample.sh ์˜ค๋ฅ˜ ๋‚ด์šฉ # ./sample.sh zsh: permission denied: ./sample.sh ์‰˜ ์Šคํฌ๋ฆฝํŠธ ํŒŒ์ผ์„ ์‹คํ–‰ํ•˜๋ ค๊ณ  ํ•˜๋Š”๋ฐ, ์œ„์™€ ๊ฐ™์ด permission denied (๊ถŒํ•œ์ด ๊ฑฐ๋ถ€) ๋˜๋Š” ๊ฒฝ์šฐ... ๋ญ์ง€ root ๊ณ„์ •์œผ๋กœ ์‹คํ–‰ ํ•ด์•ผ ํ•˜๋‚˜.. ์‹ถ์–ด์„œ sudo(switch user do; ์œ ์ €๋ฅผ ๋ฐ”๊ฟ”์„œ ๋’ค์— ์˜ค๋Š” ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•œ๋‹ค) ๋ช…๋ น์–ด๋„ ์‚ฌ์šฉํ•ด ๋ณด๊ณ , su(switch user; ์œ ์ €๋ฅผ ๋ฐ”๊พผ๋‹ค) ๋กœ ์‚ฌ์šฉ์ž๋ฅผ root ๋กœ ๋ฐ”๊ฟ”์•ผ ํ•˜๋‚˜.. ํ–ˆ๋Š”๋ฐ ๊ฐ„๋‹จํ•œ ๋ฌธ์ œ์˜€๋‹ค. 1) ์Šคํฌ๋ฆฝํŠธ ํŒŒ์ผ์„ ์‹คํ–‰ํ•˜๋ ค๋Š” ํด๋”์—์„œ ํ•ด๋‹น ํŒŒ์ผ์˜ ๊ถŒํ•œ์„ ํ™•์ธํ•˜์ž (์œ ์ € ๊ถŒํ•œ์ด ์•„๋‹˜) # ls -al 1.1) ํŒŒ์ผ์˜ ๊ถŒํ•œ์€ ----------(000) ๋ถ€ํ„ฐ -rwxrwxrwx(777)๊นŒ์ง€ ๋  ์ˆ˜ ์žˆ๋Š”๋ฐ, (์—ฌ๊ธฐ์„œ ๊ฐ€์žฅ ์•ž์—.. 2021. 11. 23.