We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11802
    • 12 Posts
    I try to install Revo 2.0.0-pl on my VPS.
    The setup script runs through until the pre-installation checks.
    All checks are successul (OK!) except one:

    Checking if /srv/www/vhosts/<mydomain.com>/httpdocs/ directory is writable: Failed!

    Yes, I have tried all combinations of access rights for httpdocs/ including 0777. No change. The checks for the other directories which have write access riquired are successful. So what am I missing.

    Is there any setting for PHP or Apache httpd that prevents the script from writing to the document root?

    thanks for any hint
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      Who is the host?

      Also... what is the owner:group of the directory?
        • 11802
        • 12 Posts
        the host is 1and1
        I have tried different owners/group combinations:
        wwwrun:www with 0770
        <myusername>:psacln with 0777
        <myusername>:psaserv with 0770 and 0777

        always with the same result.
          • 11802
          • 12 Posts
          sorry I forgot to mention: I’m doing the advanced installation with custom config id but default directories, means:
          httpdocs/connectors/
          httpdocs/core/
          httpdocs/setup/
          httpdocs/manager/
          httpdocs/ as doc path
            • 9207 ☆ A M B ☆
            • 2,475 Posts
            Sometimes with vhosts I’ve had problems with the paths... if you put a php file in your document root that prints out getcwd(); command -- what does that state your path to be?
              • 11802
              • 12 Posts

              getcwd() prints out:
              /srv/www/vhosts/<mydomain.com>/httpdocs

              from phpinfo():
              openbasedir = /srv/www/vhosts/<mydomain.com>/httpdocs:/tmp

              PHP version 5.2.9
              MySQL version 5.0.45
              Apache 2.2.4
              SUSE Linux 64bit

              thanks for helping me trouble shoot this. very appreciated. maybe something else I could check?

              P.S.: just recognized that I’ve posted in the developement and coding forum. Don’t know if this is the wrong forum for installation or support related questions. Just followed the link from this wiki page: http://rtfm.modx.com/display/revolution20/Advanced+Installation#AdvancedInstallation-PreInstallationChecks
                • 9207 ☆ A M B ☆
                • 2,475 Posts
                Hmmm.... Previously when you changed the permissions for the httpdocs folder, did you change the permissions for that one folder, or for it and all its contents recursively?

                e.g.
                chmod -R 777 httpdocs/


                  • 11802
                  • 12 Posts
                  just changed it for httpdocs only (without -R).

                  But also changed it for the other directories which need be writeable like core/cache and core/packages. For these dirs I applied -R 0770 and changed the owner to <mystandarduser>:psaserv recursively. the checks for the subdirs are passing OK.

                  Wouldn’t it be a security risk to change permissions for all files and folders?

                    • 11802
                    • 12 Posts
                    Just made a test running this script:

                    <html>
                    <head>
                    	<title>Server Info</title>
                    </head>
                    <body>
                    	<h1>Here is some info about your server installation</h1>
                    	<h2>Your web server:</h2>
                    	<?php
                    		print "<p>Current directory (system('pwd'): " . system('pwd') . "</p>";
                    		print "<p>Current directory (getcwd();): " . getcwd() . "</p>";
                    		print "<p>Directory is writeable = " . is_writeable(getcwd()) . "</p>";
                    	?>
                    	<h2>Your PHP installation:</h2>
                    	<?php
                    		print "<p>PHP runs under the user: " . system('whoami') . "</p>";
                    	?>
                    	<?php
                    		echo "<p>PHP Version = ".phpversion()."</p>";
                    	?>
                    </body>
                    </html>
                    


                    returns this output:

                    Here is some info about your server installation
                    Your web server:
                    /srv/www/vhosts/haraldmaida.at/httpdocs
                    
                    Current directory (system('pwd'): /srv/www/vhosts/haraldmaida.at/httpdocs
                    
                    Current directory (getcwd();): /srv/www/vhosts/haraldmaida.at/httpdocs
                    
                    Directory is writeable = 1
                    
                    Your PHP installation:
                    wwwrun
                    
                    PHP runs under the user: wwwrun
                    
                    PHP Version = 5.2.9


                    how is the setup script determining whether httpdocs is writeable or not?
                      • 9207 ☆ A M B ☆
                      • 2,475 Posts
                      My personal recommendation here is: "just make it work." There isn’t a security risk on a new site. Who cares if it gets hacked right now? You’re in the process of nuking it anyhow. I would try peeling back permissions all the way, just to see if that has an effect. Hopefully you can find a combination that works, then you can work backwards from there to see what exactly was causing the problem.