[Linux] user chmod 777

zio·2022년 8월 24일
1

error🔥

목록 보기
1/3

setup.py 파일을 통해 명시된 버전에 맞게 설치하려고 하던 도중 다음과 같은 에러가 발생하였다.

running install
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/usr/local/lib/<folder or directory name>/test-easy-install-9739.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /usr/local/lib/<folder name>

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://setuptools.readthedocs.io/en/latest/easy_install.html

Please make the appropriate changes for your system and try again.

error를 찬찬히 보던 도중 아래의 문구가 눈에 들어왔다. 권한 문제인듯 하였다. 아무래도 연구실 서버에 컨테이너를 할당받아 사용하는데 기존에 컨테이너를 생성한 계정 말고 다른 새로운 계정을 추가하여 사용하다보니 권한 에러가 자주 발생하는 것 같다.

1st trial chmod 777 명령어로 권한을 변경한다

chmod 777 <folder name>

오류 발생 다음과 같은 오류가 발생했다

chmod: changing permissions of <folder or directory name>: Operation not permitted

2nd trial sudo로 실행하였다.

sudo chmod 777 <folder name>

해결완료 ! 인 줄 알았으나 맨 처음 난 에러가 동일하게 발생함.

ls -l

을 해서 권한을 체크하였는데

권한은 모두 풀려있었지만 root에 한해서만 풀린거였다...!
나는 사용자이기 때문에 사용자를 추가해주어야 했다

sudo chmod ugo+rwx <folder or directory name>

u: 사용자
g: 그룹
o: 다른 사용자
에게 read, wright, execute 권한을 주었다.


권한이 staff에게도 생겼다!

python setup.py install

다시 설치를 진행해 보았다.

!! 설치가 성공적으로 진행되었다 !!

해결 완료 !!

profile
🐣

0개의 댓글