LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-03-2011, 11:25 PM   #1
edpa
LQ Newbie
 
Registered: Nov 2011
Posts: 2

Rep: Reputation: Disabled
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.
 
Old 11-03-2011, 11:33 PM   #2
saivnoba
Member
 
Registered: Aug 2010
Distribution: Debian Sid, openSUSE, Gentoo, Slackware64
Posts: 68

Rep: Reputation: 2
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.
 
Old 11-04-2011, 01:13 AM   #3
author_unknown
Member
 
Registered: Aug 2007
Location: Buffalo, NY
Distribution: Fedora 7, RHEL5, CentOS 5 and Backtrack 2.0
Posts: 73

Rep: Reputation: 15
Quote:
Originally Posted by edpa View Post
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.
 
Old 11-04-2011, 03:16 AM   #4
edpa
LQ Newbie
 
Registered: Nov 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by saivnoba View Post
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.
 
Old 11-04-2011, 08:58 AM   #5
saivnoba
Member
 
Registered: Aug 2010
Distribution: Debian Sid, openSUSE, Gentoo, Slackware64
Posts: 68

Rep: Reputation: 2
Quote:
Originally Posted by edpa View Post
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.

Last edited by saivnoba; 11-04-2011 at 09:16 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't execute c++ binaries, "permission denied"... even though permission is 777 SerfurJ Programming 14 02-20-2009 05:50 AM
'permission denied" inspite of right permission flags on network drive anirudhvij Linux - Enterprise 8 05-22-2007 06:57 AM
Permission denied jagman026 Fedora 3 01-01-2005 04:45 PM
Permission Denied Deag^ Linux - Newbie 2 10-20-2004 03:14 PM
Permission Denied DB03 Linux - Newbie 8 04-19-2004 06:20 AM


All times are GMT -5. The time now is 01:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration