Correct File folder permissions question

inthukha

Well-Known Member
Jul 17, 2013
61
0
6
cPanel Access Level
Root Administrator
Hello,

Basically cPanel create the user it will automatically create the user ownership permissions to all of the user files and folders as well when needed apache can also work smoothly with that permissions.

for example, Wordpress installed in cpanel user directory and i can update wordpress from its Admin panel even wordpress will not asking me FTP detail for write the files and folders. even it will Editable inside the Admin Panel without any issue.

Now come to issue side:

I created the user in server that not have cPanel installed via Local User Group and allow the user to login via ProFTPD and assign the recursive Ownership of same username and group to the user directory file/folders after that i installed Wordpress and i m able to Edit file in the FTP but when i try Update from Admin Panel its asking me FTP Username Password. and I can't able to Edit its File in the Admin Panel.

My question is: By default cPanel give "644" to Files and "755" to Folders. i Set the same permissions But this has not fix the issue. So how can i fix this permissions issue so can Edit the File via FTP as well inside the Admin Panel which is Basically Send Request Through HTTP to Apache and Apache write the files within same username in the cPanel. I want to know the same method and how can i implement that for Testing Purpose.

One more thing here, if i set permissions to the apache user group like "chown -R apache:apache /home/domain.com/" then wordpress can update without asking FTP User/Pass but it will not editable to the proper user

Thanks
 
Last edited:

Nick57

Well-Known Member
Jul 19, 2005
103
0
166
cPanel Access Level
Root Administrator
If I understand it right, you have not cPanel installed, so a guess is that your files should be 755 and folders 777 [not good really] but give it a try, it if works then you know why. Why your not using cPanel?
 

inthukha

Well-Known Member
Jul 17, 2013
61
0
6
cPanel Access Level
Root Administrator
@Nick57,

Thanks for reply, off-course i use cPanel on production server. Its my Test-box where i didn't use cPanel. that is the reason i m just try to understand cPanel trick that they use for permission in which you don't have to set permissions 777 for files.

I think its because of SUEXEC maybe ? i just basically want to know Why all CMS can upgrade itself if they are hosted on cPanel server. because of SUEXEC or SuPHP ?
 

quietFinn

Well-Known Member
Feb 4, 2006
1,903
467
438
Finland
cPanel Access Level
Root Administrator
@Nick57,

Thanks for reply, off-course i use cPanel on production server. Its my Test-box where i didn't use cPanel. that is the reason i m just try to understand cPanel trick that they use for permission in which you don't have to set permissions 777 for files.

I think its because of SUEXEC maybe ? i just basically want to know Why all CMS can upgrade itself if they are hosted on cPanel server. because of SUEXEC or SuPHP ?
Because of suPHP.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello :)

Yes, it's likely that suPHP is in-use on the cPanel server. Try setting up your development system to use suPHP and see if you get similar results.

Thank you.