강의

멘토링

커뮤니티

Inflearn コミュニティ Q&A

boomboom のプロフィール画像
boomboom

投稿した質問数

Linuxシェルスクリプトマスター

実行ファイルを使用する4つの方法

sudo cp helloworld.sh /usr/bin 명령어 질문

作成

·

596

1

안녕하세요  맥사용자입니다
sudo cp helloworld.sh /usr/bin를 실행했는데도 

cp: /usr/bin/helloworld.sh: Operation not permitted 라고 에러가 납니다 그래서 구글링하니

 sudo cp helloworld.sh /usr/local/bin로 실행하라고 해서 했더니 정상적으로 진행이 되었습니다.

/usr/bin와 /usr/local/bin의 차이가 무엇일까요?

 

linuxshell-script

回答 1

0

guileschool님의 프로필 이미지
guileschool
インストラクター

개감님!

맥오에스의 보안정책때문에 /usr/bin 은 읽기 전용으로 설정되어있다고 합니다.

아래 글을 참고하시면 도움이 되실 듯합니다.

Correct solution is to copy or install to /usr/local/bin not /usr/bin.This is due to System Integrity Protection (SIP). SIP makes /usr/bin read-only but leaves /usr/local as read-write.

https://stackoverflow.com/questions/32659348/operation-not-permitted-when-on-root-el-capitan-rootless-disabled

 

boomboom のプロフィール画像
boomboom

投稿した質問数

質問する