LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Permission denied (https://www.linuxquestions.org/questions/linux-newbie-8/permission-denied-911774/)

edpa 11-03-2011 10:25 PM

Permission denied
 
After extracting program, the instruction is to copy or move contents of bin folder to path directory. Unable to execute with message "permission denied." Please help.

saivnoba 11-03-2011 10:33 PM

Which program, what are you trying to copy and to which directory? Please provide details.

If you are working on any directory other than /home/<yourusername>, you need to be root.
Code:

su -
Provide your root (administrator) password and try what you are doing.

However, remember while working with root privileges its easy to mess-up, if we don't know what we are doing.

author_unknown 11-04-2011 12:13 AM

Quote:

Originally Posted by edpa (Post 4515400)
After extracting program, the instruction is to copy or move contents of bin folder to path directory. Unable to execute with message "permission denied." Please help.

It is because you dont have permissions to "write" something in bin directory.
A ls -ld /bin would show something like drwxr-xr-w root root

There are three possible remedies:
1. su as root and change the permissions of /bin folder using chown command. ( I wont't recoomed that specially if the machine is in a corporate scenerio)
2. su as root add your user to /etc/sudoers file and then login as that user and then execute sudo cp (source) destination .
3. su as root and copy the files as root to /bin folder.
4. add the existing folder (the floder which contains the executable you wish to move to bin folder) to your path variable. The PATH variable is generally defined in user's home directory in .bash_profile or .bash_rc file.

edpa 11-04-2011 02:16 AM

Quote:

Originally Posted by saivnoba (Post 4515402)
Which program, what are you trying to copy and to which directory? Please provide details.

If you are working on any directory other than /home/<yourusername>, you need to be root.
Code:

su -
Provide your root (administrator) password and try what you are doing.

However, remember while working with root privileges its easy to mess-up, if we don't know what we are doing.

I am trying to install "Mira" (a open source DNA sequence assembler software) in my Ubuntu 11.04 system. After extracting the software to a subdirectory under /home./Downloads, I opened a file about how to install the software as follows: "Download the package, unpack it. Inside, there is -- beside other directories -- a bin. Copy or move the files and soft-links inside this directory to a directory in your $PATH variable. to copy or move the contents of the bin folder to the system path directory.
I cd to the bin subdirectory of Mira to copy the files to /usr/local/bin but i get the permission denied message even if I am root. Thanks.

saivnoba 11-04-2011 07:58 AM

Quote:

Originally Posted by edpa (Post 4515487)
I am trying to install "Mira" (a open source DNA sequence assembler software) in my Ubuntu 11.04 system. After extracting the software to a subdirectory under /home./Downloads, I opened a file about how to install the software as follows: "Download the package, unpack it. Inside, there is -- beside other directories -- a bin. Copy or move the files and soft-links inside this directory to a directory in your $PATH variable. to copy or move the contents of the bin folder to the system path directory.
I cd to the bin subdirectory of Mira to copy the files to /usr/local/bin but i get the permission denied message even if I am root. Thanks.

Did you use "sudo" or "su -" to become root? In Ubuntu, you should use 'sudo' like
Code:

sudo cp -rf /home/edpa/Downloads/Mira/bin/* /usr/local/bin/
I am not sure what is the exact name of the bash file in Ubuntu. If it is .bashrc, may be you can do this (considering the filenames are all correct)
Code:

mv ~/Downloads/Mira/bin/ ~/
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc

Logout and log back in. You may have to reboot if logout/login does not work.


All times are GMT -5. The time now is 08:36 AM.