![화물 실행 - 권한 거부됨 [이전] Rust 설치 - 권한 거부됨](https://linux55.com/image/146627/%ED%99%94%EB%AC%BC%20%EC%8B%A4%ED%96%89%20-%20%EA%B6%8C%ED%95%9C%20%EA%B1%B0%EB%B6%80%EB%90%A8%20%5B%EC%9D%B4%EC%A0%84%5D%20Rust%20%EC%84%A4%EC%B9%98%20-%20%EA%B6%8C%ED%95%9C%20%EA%B1%B0%EB%B6%80%EB%90%A8.png)
저는 Rust를 설치 curl https://sh.rustup.rs -sSf | sh
하고 그 지침을 따랐습니다. 설치가 성공적으로 완료되었으며 다음과 같이 표시됩니다.길다음이 추가되었습니다 .bash_profile
:
export PATH=$HOME/.cargo/bin:$PATH
echo ing은 $PATH
변수가 다음과 같이 올바르게 설정되었음을 보여줍니다.
rust@rusty:~$ echo $PATH
/home/rust/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
/home
별도의 파티션으로 설치하여 다음 /etc/fstab
과 같이 설치하였습니다.
# Mounting home partition
/dev/sda4 /home ext4 rw,async,users 0 0
noexec
처음에는 옵션 중 하나로 사용했습니다 . 그러나 이를 제거해도 결과는 변경되지 않았습니다.
내 기본 파티션 권한이 의심되지만 /home
확인할 다른 Linux 실행 상자가 없습니다.
total 20
drwx------ 2 root root 16384 Jan 18 08:38 lost+found
drwxr-xr-x 22 rust rust 4096 Jan 19 19:45 rust
이 권한이 맞나요?
내가 누락된 부분/잘못한 부분과 문제를 해결하는 방법에 대해 누구든지 알려주시면 크게 감사하겠습니다.
@kusalananda가 댓글을 달고 나서 이것을 깨달았습니다.
편집-1
rust@rusty:~$ cargo
bash: /home/rust/.cargo/bin/cargo: Permission denied
도움말 문서를 요청하라는 메시지가 표시되지만 cargo
위와 같은 내용은 표시되지 않습니다.
편집 2.cargo
다음에 대한 권한이 추가되었습니다..cargo/bin
rust@rusty:~$ ls -l .cargo/
total 8
drwxr-xr-x 2 rust rust 4096 Jan 19 18:45 bin
-rw-r--r-- 1 rust rust 37 Jan 19 18:58 env
rust@rusty:~$ ls -l .cargo/bin/
total 108560
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 cargo
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 cargo-clippy
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 cargo-fmt
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 rls
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 rustc
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 rustdoc
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 rustfmt
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 rust-gdb
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 rust-lldb
-rwxr-xr-x 10 rust rust 11116056 Jan 19 18:45 rustup
편집-3:
>> curl https://sh.rustup.rs -sSf | sh
info: downloading installer
Welcome to Rust!
This will download and install the official compiler for the Rust programming
language, and its package manager, Cargo.
It will add the cargo, rustc, rustup and other commands to Cargo's bin
directory, located at:
/home/rusty/.cargo/bin
This path will then be added to your PATH environment variable by modifying the
profile files located at:
/home/rusty/.profile
/home/rusty/.bash_profile
You can uninstall at any time with rustup self uninstall and these changes will
be reverted.
Current installation options:
default host triple: x86_64-unknown-linux-gnu
default toolchain: stable
modify PATH variable: yes
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>1
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2019-01-17, rust version 1.32.0 (9fda7c223 2019-01-16)
info: downloading component 'rustc'
79.5 MiB / 79.5 MiB (100 %) 883.2 KiB/s ETA: 0 s
info: downloading component 'rust-std'
54.3 MiB / 54.3 MiB (100 %) 611.2 KiB/s ETA: 0 s
info: downloading component 'cargo'
4.4 MiB / 4.4 MiB (100 %) 761.4 KiB/s ETA: 0 s
info: downloading component 'rust-docs'
8.5 MiB / 8.5 MiB (100 %) 553.6 KiB/s ETA: 0 s
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-docs'
info: default toolchain set to 'stable'
stable installed - (error reading rustc version)
Rust is installed now. Great!
To get started you need Cargo's bin directory ($HOME/.cargo/bin) in your PATH
environment variable. Next time you log in this will be done automatically.
To configure your current shell run source $HOME/.cargo/env
답변1
문제는 /etc/fstab
내 입장이다. 설치 방법을 변경한 후에 작동했습니다. 이것은 나의 새로운 fstab
항목입니다:
/dev/sda4 /home/rusty ext4 defaults 0 2
소유자와 그룹을 다음으로 변경했는데 /home/rusty
작동 rusty
했습니다.