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.
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.
As the title says. Recently I moved /home over to it's own partition so I had to change the owners back, but the permissions seem right. It definetely worked before but I think this is the first time I have tried since I switched it over.
I tried making a simple C++ 'hello world' to figure this out. In my home directory, the binary helloworld has permissions -rwxr-xr-x. However trying to execute this (./helloworld) gives me "bash: ./helloworld: Permission denied". I can chmod 777 and chmod +x all I like, but nothing changes. Also, root gets the same error trying to execute this anywhere under /home. However root can execute it when it is located under /root.
Hmm..also make sure the directory /home/$USER has execute permissions set too. Actually this is the first time I've thought of this, but if you happened to remove execute permissions from a directory, would it prevent you from executing files from inside the directory as well (why else would you be able to set directory's execute permissions?)
Just in case, try
chmod a+x /home/$USER
And see if it did the trick. I have no clue if it should work, so don't get too enthusiastic..
...(why else would you be able to set directory's execute permissions?)
Execute permission on a directory allows you to "cd" to it. If you can't cd to it, you can't execute anything there either. Generally when you want to keep people out of a directory you remove all permissions. It is possible to create a directory with read permissions but not execute permissions, but you get some pretty funkly looking ls -l output!
(why else would you be able to set directory's execute permissions?)
Very commonly, you want to allow a directory execute permission but deny read permission; that way, things that know the proper filenames will still have as much access to them as before, but won't be able to list the directory.
I can't give you a direct answer to this, but I can explain a similar problem. I use the Pascal programing language, and use fpc to compile it. Sometimes, when I try to execute it, it gives me the permission denied error, especially if I make a program that reads/writes from other files. And this happens even if I am logged in as root.
My only advice is to experiment with chmod on all the files the program should access, including maybe the compiler's ones...
And another small detail... Are you sure you have all permissions in that directory? On some linux versions, you have a /home/username folder to which you have access, but don't have in /home .
Also check the mount parameters, that fixed another permissions problem of mine, although I can't help you much here.