Permission denied to execute anything under /home
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. I really don't understand. |
What are the /home mounting options in your /etc/fstab file? You didn't specify "noexec" did you?
|
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 Code:
chmod a+x /home/$USER |
Please post the output of 'mount'.
|
Quote:
|
Quote:
|
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. |
Quote:
Thanks for the help, |
No problem. Glad you got it working so easily. :)
|
All times are GMT -5. The time now is 10:37 PM. |