How to change the default user of file upload via FTP ("from admin to apache")

kam

Verified User
Joined
Jan 4, 2009
Messages
55
How to change the default user of file upload via FTP ("from admin to apache")

Hello,

I wonder to know how to change the default user of file upload via FTP ("from admin to apache")

I have not install suphp in my server because I think this will reduce the performance.
But at the same time, I do not wat to set the folder permission to 777 althougt the server will not share with other people.

Instead, I manually chmod the specific folder to "apache" and then set the folder permission to 755. and it's work.

My question is what setting I should change changed to make all files are owned by "apache", in case of upload via FTP account.

Also, Is there any security risk to change the folder owner from admin to apache?

Thanks in advance

Kam
 
My question is what setting I should change changed to make all files are owned by "apache", in case of upload via FTP account.
FTP can't do it. Apache can't do it.

So you'll need to create a cronjob running as root to do it.
Also, Is there any security risk to change the folder owner from admin to apache?
Yes, it's a major security risk, because any file reachable by the browser can be manipulated (limited only by it's mode mask) by anyone in the world.

Jeff
 
Back
Top