Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I'm having some troubles. I compiled a C program and didn't get any errors. I go to run the program and get this
Code:
darinf@localhost c $ ./program
-bash: ./program: Permission denied
Here is 'ls -l' output
Code:
-rwxrwxrwx 1 darinf users 13641 Aug 17 16:34 program
I also ran
Code:
chmod u+x program
and still nothing. I also go to su to root and I can't, I type the password and get "Permission denied" although I can use the same password to log in as root, just not su to root. And when root I still get the same errors when running the program.
I didn't think it was necessary to make a compiled C prog. executable, but i tried and it still didn't work. Also, some interesting shell scripting problems are coming up, for instance, after creating a hello world script here is what happens
Code:
darinf@localhost c $ chmod u+x test
darinf@localhost c $ ./test
-bash: ./test: /bin/bash: bad interpreter: Permission denied
darinf@localhost c $ /bin/bash test
Hello world
I don't know if this is related, but still interesting
Do you think to check it again with GCC will make any sense?
Just yesterday one our member sent me his program compiled with g++ and I had the same thing, but typing
#su
#chmod +x lesson
solved the bugger
Fixed one of the problems! It turns out the programs are on a seperate harddrive, a hardrive that doesn't have exectuable permisisons, everything works fine in /
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.