Question:
unix shell command question...permission denied..?
?
2011-05-13 06:16:37 UTC
I am a totally new beginner to unix shell programming and I was trying to open and run a file when I got the permission denied or access denied....A developer said its a permission issue that you will need to change in the unix shell...here is how it looks...how do i do it? im follwoing some tutorials but they are confusing..


http://imageshack.us/photo/my-images/38/unixshell.png/
Three answers:
koppe74
2011-05-13 07:29:16 UTC
Try

./bin/run.sh



The shell only automatically looks for executables in certain directories (specified in the PATH environment-variable). If the executable is somewhere else, you must specify the absolute or relative path to the program:

Absolute:

/home/bok/bin/program.sh

/opt/package/bin/program.sh

Relative:

./program.sh

./bin/program.sh

Short hand for home-directory:

~/program.sh

~/bin/program.sh

Short hand for another user's (brian's) home-directory (if permission on his home-dir allows you access):

~brian/program.sh



In addition, the executable-bit for the program/script must be set:

Gives owner permission to run it:

chmod u+x progam.sh

Gives everybody permission to run it:

chmod a+x progam.sh



ls -l shows the permissions. rwxr-xr-x means the owner can read, write and execute the program, while the group and owner can only read and execute. If there are no x (or s), the it can't be run.



To see your current PATH:

echo "$PATH"

To add something to your PATH (in this case, a bin-directory under your home-dir):

export PATH="$PATH:~/bin"



To add the current directory (.) to your PATH is * dangerous*. If you add it, *always* place current-dir *last*, and watch out for typos. *Never* do this for the root-user!:

export PATH="$PATH:."



To make it permanent, add this to your .bashrc, .profile, .bash_login or similar files.
?
2016-10-19 13:25:50 UTC
extremely of itemizing the questions, clarify what problems you're having and precisely what it extremely is which you do not understand. What have you ever tried for each and how has it failed? we can't do your homework for you, yet will help with explaining problems while you're slightly clearer.
2011-05-13 06:40:15 UTC
that site probably has a keylogger


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...