LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 04-29-2002, 12:41 AM   #1
Korshun
LQ Newbie
 
Registered: Apr 2002
Location: Sydney, Australia
Distribution: Fedora Core 6
Posts: 27

Rep: Reputation: 15
RH7.2 bash: permission denied


Hi all...

First of all, I know this is a kinda general question, but from what I can say, this doesn't work on RedHat 7.2 but works with Mandrake 8.0... tried it myself.

Anyways, the problem is - I'm a first year software eng. student and we've just started coding at uni... just some basic stuff. We compile our code on the uni computers and when we get home, we can download the compiled stuff thru ftp... When I try to run the downloaded compiled program, I get a message saying:

bash: ./programName: Permission denied

All that background stuff isn't exactly relevant, but bow what I want to know is - is this permission denied thing within the program I wrote, or the shell? Funny thing is that I put Mandrake 8.0 on this very computer a few days ago, and it worked fine... I tried to keep exactly the same settings (software)
when installing Mandrake... especially the compiler, I used the exact same versions during the installation. I didn't like Mandrake too much (no offense intended) cause while it solved this problem, it introduced a heap of other ones and I don't wanna deal with em now... besides, I only have the first Mandrake cd which makes thing a little bit more difficult... So I'm back with RH7.2 for now.

Another thing is - I can't even compile my code using RH7.2. Just get a lot of errors along the lines of ... undefined reference to 'blah blah' ... With Mandrake, everything compiles just fine.
I doubt this thing is compiler specific (but FYI I'm using ghc - www.haskell.org/ghc) so I'm hoping there's something within the bash shell that I can actually change to make this work.

I know this is a long shot to solving the problem, but can anyone at least guess what's going on here? Even a starting point would be really appreciated... Red Hat runs beautifully now and I'd hate to have to go looking for that second Mandrake cd...

Thanks in advance.
Korshun.
 
Old 04-29-2002, 07:28 AM   #2
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 18.04, Bodhi 5.0
Posts: 691

Rep: Reputation: 45
Quote:
bash: ./programName: Permission denied
This has to do with the permissios on the file "programName". You can see the permissions on the file by entering:

ls -al programName

The read, write, and execute permissions by owner, user, and group are listed on the left. You need to study up on what permissions are, how to set them, and the impact on system security. If your home computer is not part of a network (including the internet), then it would be safe to log in as the root user and enter:

chmod 777 programName

or

chmod +r programName

Otherwise, you will want to add this program file to a group by changing the group permissions on the file and entering your username into the group.

Take some time to study security, you'll be much better off in the long run.
 
Old 04-29-2002, 09:00 AM   #3
Korshun
LQ Newbie
 
Registered: Apr 2002
Location: Sydney, Australia
Distribution: Fedora Core 6
Posts: 27

Original Poster
Rep: Reputation: 15
wow, it works...

jglen490, I would really like to thank you... it actually works now! I was beginning to feel dissapointed, but you have let me see the light... ))

I don't suppose you can tell me while the thing doesn't compile now?

Thanks again... all the best.
Korshun
 
Old 04-29-2002, 10:22 AM   #4
jglen490
Member
 
Registered: Apr 2002
Location: The next brick house on the right.
Distribution: Kubuntu 18.04, Bodhi 5.0
Posts: 691

Rep: Reputation: 45
There is a programming forum here on Linux Questions, and that may be the best place to ask. However, to solve this problem, one would need the actual error being returned by the compiler. It could be that there is a header file missing or different from your university system environment. It could be that your compiler at home doesn't handle something the same as the university compiler. I've compiled things at home that refused to compile elsewhere -- and vice versa.

I would recommend you post on the Programming forum with the exact error message and some info about your system and the compiler. Good luck to you, and you are welcome !
 
  


Reply



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
su: /bin/bash: Permission denied dwarf007 Linux - General 10 01-20-2006 04:32 PM
bash: ./bootstrap: Permission denied jimi2012 Linux - Software 2 10-11-2005 11:42 AM
bash: /etc/profile: Permission denied Zero-0-Effect Linux - General 3 03-28-2005 04:47 AM
bash: /etc/profile: Permission denied Kanon Linux - Newbie 4 01-21-2005 08:01 AM
bash: /etc/profile: Permission denied madmax Linux - General 15 07-20-2003 06:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 01:24 PM.

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
Open Source Consulting | Domain Registration