Permission problem after disabling suphp

nidhal

Member
Nov 12, 2012
5
0
1
cPanel Access Level
Root Administrator
Hello,

So I had suphp enabled by default in my server but I wanted to rebuild apache and php, once done I had big problem with permissions, my script could not include/open/write any file even when the folder permission is 777.
So I had to enable suphp again and it worked just fine.
Is there any way to fix this problem? I did some research and I think this has something to do with file ownership?
 

iakela

Member
Oct 18, 2009
17
0
51
cPanel Access Level
Root Administrator
Hi,

Probably there is wrong permission on public_html folder, should be: 755 and user:user. Anyway, you should to check error_log to be sure:
Code:
tail -f /usr/local/apache/logs/error_log
 

nidhal

Member
Nov 12, 2012
5
0
1
cPanel Access Level
Root Administrator
Hi,

Probably there is wrong permission on public_html folder, should be: 755 and user:user. Anyway, you should to check error_log to be sure:
Code:
tail -f /usr/local/apache/logs/error_log
That didn't help, I keep getting
"failed to open stream: Permission denied"
I changed the ownership was already user:user
I found someone who had the same issue, he said he fixed this using the chown command (user:nobody)
Any idea on how to use this ?
 

Galvin

Member
Aug 27, 2011
8
0
51
Hi,

You need to change the permissions and ownership of the public_html.

Ownership :- User:Nobody
Permission :- 750

Under public_html folder you need to set the permissions like below :

For Folder :-
Ownership : user:user
Permission : 755

For Files :-
Ownership : user:user
Permission : 644

Once it will done issue will be fixed.