I have a MediaTemple DV server and I noticed that my installer doesn’t set the permissions like they do on the shared version of the server.
Can anyone give me any insight as to what I might need to do on my virtual private server to make this possible?
This has been plaguing me for quite some time.
-
MODX Staff
- 10,725 Posts
Which installer? What version of MODx? What permissions? AFAIK, none of the MODx installers automatically set permissions...
-
☆ A M B ☆
- 24,524 Posts
It all depends on the server configuration. Clearly the shared hosting servers have a different configuration than your VPS. MODx has nothing at all to do with it. Trying to use scripts to set the required permissions is an exercise in futility, as many servers will not allow it; again it all depends on the server configuration.
Well, either way, I’m interested in any information someone can offer in terms of what those differences might be.
It’s not really about what MODx might be doing.
I really want to be able to set up my DV in a way that would allow the installer to behave exactly as it did on the shared server.
I’m thinking I might just do a line-by-line comparison of the phpinfo files of these two servers to see if that might shed some light.
-
☆ A M B ☆
- 24,524 Posts
Is PHP running as a CGI or FastCGI, with suexec of some kind, or as an Apache module with some kind of suexec module, or as a standard Apache module?
The thing is, when you upload the files, they are "owned" by your FTP user. When PHP runs as an Apache module, the .php scripts run as the Apache user. This means that this user won’t have permissions to do a lot of things in the directories you uploaded, since they are owned by your FTP user. The permissions have to be changed to allow "world" (anybody) to write to them. This is not really a good idea on a shared server, so many shared hosting companies use some form of suexec for PHP.
If PHP is running under some form of suexec, when a .php file is loaded for execution the user is changed to be the owner of that .php file. (hence the "Switch User EXECute" - suexec). Now the script has full owner’s access to all the files and directories without having to change their permissions to allow "world" access.
I’m pretty sure it’s a standard Apache module.
Would I experiment with this in my php.ini?
-
☆ A M B ☆
- 24,524 Posts
No. It’s not really a PHP issue; it’s a server issue.
Nevermind, I’m doing some research on it and I see the different methods of manipulating this.
I’ll play with it and post results tomorrow.