chmod - 관리자가 아닌 사용자에게 권한을 실행하시겠습니까?

chmod - 관리자가 아닌 사용자에게 권한을 실행하시겠습니까?

나는 한때 chmod디렉토리의 모든 것을 실행 가능하게 만들었습니다. 그러나 해당 디렉토리에 있는 프로그램 중 하나를 일반 사용자(나)로 실행하려고 하면 "명령을 찾을 수 없습니다"라는 메시지가 나타납니다. 을 실행하면 su프로그램이 실행됩니다. 내가 무엇을 놓치고 있나요? 저는 Fedora 22를 사용하고 있습니다. 이것은 완전한 bash 세션입니다. (또한 내 Git 설치가 불완전하다는 것을 나타내지만 그게 중요하지 않다고 생각합니다.)

bash: home/brian/git-completion.bash: No such file or directory
bash: /home/brian/git-prompt.sh: No such file or directory
bash: __git_ps1: command not found...
brian ~ $ ipython
bash: ipython: command not found...
Similar command is: 'python'
bash: __git_ps1: command not found...
brian ~ $ su
Password: 
bash: home/brian/git-completion.bash: No such file or directory
bash: /root/git-prompt.sh: No such file or directory
bash: __git_ps1: command not found...
root brian $ ipython
Python 2.7.10 |Anaconda 2.3.0 (64-bit)| (default, May 28 2015, 17:02:03) 
Type "copyright", "credits" or "license" for more information.

IPython 3.2.0 -- An enhanced Interactive Python.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: 

또한 내 .bashrc의 전체 목록은 다음과 같습니다.

sudo# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
    . /etc/bashrc
fi

# Enable tab completion
source home/brian/git-completion.bash

# colors!
green="\[\033[0;32m\]"
blue="\[\033[0;34m\]"
purple="\[\033[0;35m\]"
reset="\[\033[0m\]"

# Change command prompt
source ~/git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE=1
# '\u' adds the name of the current user to the prompt
# '\$(__git_ps1)' adds git-related stuff
# '\W' adds the name of the current directory
export PS1="$purple\u$green\$(__git_ps1)$blue \W $ $reset"

# added by Anaconda 2.3.0 installer
export PATH="/root/anaconda/bin:$PATH"

답변1

이는 권한과 관련이 없는 것 같습니다. "명령을 찾을 수 없음" 대신 "권한 거부됨"이 표시됩니다.

.무슨 일이 일어나는지는 당신이 당신의 $PATH뿌리를 가지고 있는 것처럼 보인다는 것입니다.미친), 그러나 귀하의 계정에는 적용되지 않습니다.

추가하세요. 안전한가요? 내 길은? 어떻게요?

대답: 아니요. tar.gz 추출cd에디렉터리를 하고 Just own your 컴퓨터를 실행합니다.lsls/bin/ls~/.bashrcsu

현재 디렉토리에서 무언가를 실행하려면 다음을 실행하십시오../cmd

답변2

문제는 경로 문제도, 권한 문제도 아닌 것으로 밝혀졌습니다. Anaconda Python은 내 /root 디렉토리에 설치되어 있으며 이는 수퍼유저만 액세스할 수 있음을 의미합니다. 집에 Anaconda를 다시 설치하면 문제가 해결되었습니다.

관련 정보