Quote:
Originally Posted by stukelly
Just before Christmas we transferred our reseller account to a semi dedicated server. Since then we have had trouble with file permissions for uploading files.
We are using the PHP copy function.
On the reseller hosting does the PHP/Apache user have different default permissions than the semi dedicated server?
|
Hello Stuart,
Yes, you're right.. our shared/reseller servers are setup with
SuExec & suPHP method, to which I think your Semi Dedicated server isn't, as these modules aren't enabled by default cPanel configuration.
SuExec is an Apache module; as the name suggests executes files using the SU command - SU command simply switches users under which a process runs. That gives users the capability to run CGI and SSI programs using user IDs that are different from the user ID of the calling web server.. This effectively means that CGI and SSI programs will not have access to the root account or have root permissions. In other words, although the web server is using Apache/Nobody as user/group, once you initiate a script to be run from your account, it will be run with your own username. Having that said, since all files/folders and process runs are owned by your username,
777 permissions equals
755 ones in functionality.
su is usually the simplest and most convenient way to change the ownership of a login session to any other user. Since lots of CGI scripts are used to send mail, it will be easier to watch them those who send emails using such scripts..
While suPHP is a tool for executing PHP scripts with the permissions of their owners. It consists of an Apache module (mod_suphp) and a setuid root binary (suphp) that is called by the Apache module to change the uid of the process executing the PHP interpreter.
Basically, SuExec is used for CGI/SSI scripts whereas suPHP typically for PHP ones.. Having both of them configured/setup on your server would be recommended as it'd be a step closer towards security. If you want to have these modules to be installed on your server, please contact our
VPS or Support Dept & they'd get this done for you quickly, it requires a simple change in the config from WHM & the PHP/Apache recompile using the easyapache script..