[Linux] swapon: /swapfile: insecure permissions 0644, 0600 suggested.

$ sudo swapon /swapfile
swapon: /swapfile: insecure permissions 0644, 0600 suggested.
swapon: /swapfile: swapon failed: Operation not permitted

(1) 까닭

  스왑 파일(/swapfile)의 접근 권한이 0600이 아니어서 나는 오류. 스왑 파일에 대한 접근 권한은 root에게만 필요하고, 다른 계정들에 스왑 파일에 대한 읽기/쓰기/실행 권한을 줄 필요가 없다.

(2) 풀기

  chmod로 파일 접근 권한을 0600으로 바꾸고 나서 "swapon /swapfile"으로 스왑 파일을 시스템 메모리에 붙인다.

$ sudo chmod 0600 /swapfile
$ sudo swapon /swapfile
2022/08/15 23:42 2022/08/15 23:42
보람말 : , , , , ,
글 걸기 주소 : 이 글에는 글을 걸 수 없습니다.

덧글을 달아 주세요