강의

멘토링

커뮤니티

Cộng đồng Hỏi & Đáp của Inflearn

Hình ảnh hồ sơ của boomboom
boomboom

câu hỏi đã được viết

Làm chủ Shell Script Linux

4 cách sử dụng file thực thi

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

Viết

·

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

Câu trả lời 1

0

guileschool님의 프로필 이미지
guileschool
Người chia sẻ kiến thức

개감님!

맥오에스의 보안정책때문에 /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

 

Hình ảnh hồ sơ của boomboom
boomboom

câu hỏi đã được viết

Đặt câu hỏi