아마존 라이트세일 sftp root 권한

프로그래밍2018. 9. 1. 00:34

아마존 라이트세일(Amazon lightsail)을 이용해서 워드프레스 서버를 만들었습니다. 망보드 가이드대로 filezilla를 이용해서 SFTP로 서버에 접속해서 망보드 회원 관리 플러그인(mangboard-business-light-latest)을 덮어쓰리고 하려고 했더니.. 권한 문제로 업로드가 되지 않았습니다.

 

 

제 권한은 bitnami였고 폴더의 권한은 daemon인데 others에 x(쓰기) 권한이 없었기 때문이지요. putty(SSH)로 접속하면 sudo su root로 쉽게 루트 권한을 얻을 수 있는데 SFTP에서는 아무리해도 되지 않았습니다. ㅡ.ㅡ;;

 

https://docs.bitnami.com/virtual-machine/how-to/troubleshoot-permission-issues/ 그러다가 비트나미 공식 홈페이지에서 좋은 가이드를 찾았네요.

 

You Can't Upload A File Via SFTP?

If you see an error like this when uploading a file:

[...] permission denied 

Temporarily change the permissions of the destination folder or file, upload the files, and then restore the file or folder to its original state. To do this, follow the steps below:

임시로 잠깐 폭더나 파일의 소유자 권한을 바꾸라고 하네요. 물론 저도 생각했던 방법이긴 한데 SFTP로 root 권한을 얻을 수 있는 방법이 있을 거라고 생각해서 계속 찾았었는데.. 아무래도 비트나므 측에서 막아 놓은 것 같습니다~

 

SFTP를 통해 파일 업로드를 하고자 할 때는..

 

 

sudo chown bitnami TARGETFOLDER sudo chmod +w TARGETFOLDER

 

위의 명령어를 통해 잠시 권한을 바꿔야 겠습니다.

 

저는 sudo chmod -R 777 mangboard/ 명령어로 x권한 주고

sudo chmod -R 775 mangboard/ 명령어로 원래 권한으로 복귀 시켰습니다.

 

 

 

 

코딩세상님께 후원하기

작성자

Posted by 드리머즈

관련 글

댓글 영역