Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[오류] 배포 후 start.sh 실행할 때 cp command permission denied #229

Closed
kimjunghak opened this issue Feb 7, 2020 · 1 comment
Closed

Comments

@kimjunghak
Copy link

기존에 올라온 질문이 아닌지 먼저 검색해주세요!

가장 자주 나온 제보

어떤 오류인가요?

오류설명: 무중단 배포까지 수행 후에 start.sh에서 cp command를 수행할 때 permission denied가 발생합니다.

프로젝트 주소

Github에 오류가 난 프로젝트를 올려주세요.
Github 주소를 작성해주지 않으시면 답변해드릴수가 없어요!

오류 로그

어떤 오류인지 캡쳐해주세요.

[2020-02-07 15:59:13.285] [d-9TGOUHIK1]LifecycleEvent - ApplicationStart
[2020-02-07 15:59:13.285] [d-9TGOUHIK1]Script - start.sh
[2020-02-07 15:59:13.295] [d-9TGOUHIK1][stdout]> Build 파일 복사
[2020-02-07 15:59:13.295] [d-9TGOUHIK1][stdout]> cp /home/ec2-user/app/step3/zip/.jar /home/ec2-user/app/step3/
[2020-02-07 15:59:13.296] [d-9TGOUHIK1][stderr]cp: cannot create regular file ‘/home/ec2-user/app/step3/webservice-1.0.1-SNAPSHOT-20200207065812.jar’: Permission denied
[2020-02-07 15:59:13.296] [d-9TGOUHIK1][stdout]> 새 애플리케이션 배포
[2020-02-07 15:59:13.298] [d-9TGOUHIK1][stderr]ls: cannot access /home/ec2-user/app/step3/
.jar: No such file or directory
[2020-02-07 15:59:13.298] [d-9TGOUHIK1][stdout]> JAR Name :
[2020-02-07 15:59:13.298] [d-9TGOUHIK1][stdout]> 에 실행권한 추가

@kimjunghak
Copy link
Author

자체적으로 해결했습니다.

잘 되다가 안되서 ec2에 접속해서 똑같은 명령도 permission denied가 나길래 확인해보니 step3 폴더가 갑자기 root로 소유자가 바껴있어서 그렇네요...
sudo chown ec2-user:ec2-user step3
명령어로 소유자를 ec2-user로 변경하니까 잘되네요

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants