We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1331
    • 129 Posts
    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.
      • 22303 MODX Staff
      • 10,725 Posts
      Which installer? What version of MODx? What permissions? AFAIK, none of the MODx installers automatically set permissions...
        • 1331
        • 129 Posts
        I just ran it again on the MediaTemple shared server.

        Using a fresh download of 1.0.2 I did not have to set permissions for any folders or files during installation.

        See this screenshot. Am I missing something? Because this can reliably be replicated time after time on the shared server.

          • 28042 ☆ 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.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 1331
            • 129 Posts
            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.
              • 1331
              • 129 Posts
              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.
                • 28042 ☆ 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.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 1331
                  • 129 Posts
                  I’m pretty sure it’s a standard Apache module.

                  Would I experiment with this in my php.ini?
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    No. It’s not really a PHP issue; it’s a server issue.
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 1331
                      • 129 Posts
                      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.