We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    I have had a few problems with permissions not being set properly ever since I moved my sites to a dedicated server (problems which I didn’t have on shared hosting... guess this has something to do with how the server is set up).

    I moved an install without problems, updated to 0.9.2.1 (that’s when I discovered I needed to create an empty config.inc.php file and CHMOD some files to 777). But for instance, I tried to modify a document and while no error appeared (everything went as usual), the document was not modified at all.

    I immediately suspected a permission problem on manager/actions and processor, which indeed were set at 644. I did a CHMOD 755 on those but it still doesn’t work huh Hmmm, checked my previous config on shared hosting, it was 644 and working thus I guess I have to ask my administrator to explain why it doesn’t work... wouldn’t that be a thing about "ownership" ?

    But let’s cut to the question : What permission should I define for which folder, without compromising security of course ?
    Thanks !
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l'outil id
    • Most likely, you’ll need to set the folder to 777, as the file owner (who uploaded it) and the apache/php user (who tries to manipulate it) are different. Alternately you could get your admin to set up PHPSuExec and be done with these issues. wink
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 6726
        • 7,075 Posts
        Thanks Ryan, I am getting bit by bit into the dedicated server issues tongue PHP is running as an Apache module, right now. I didn’t ask for PHPSuExec, I thought it was better to have php running as a module (don’t remember where I read that).

        Anyway, the admin has not yet installed PHP 5.1.3 and updated Apache to 2.x, the config is not carved in stone...

        He suggested to use the following command :

        chmod og+w /home/login/www/

        I am on my way to try this... will it do the trick for MODx ?

        Edit : Apparently it did not... sad
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l'outil id
        • chmod 777 the folders that need to be writable (assets/ assets/images/ assets/cache/ ...) (I think chmod a+rwx)

          chmod 666 the files that need to be world writable (cache files maybe your css files ...) (I think chmod a+rw)

          Other folders should probably be 755; other files 644 (including config.inc.php)

          Note: I’m no unix guru and consult a professional!
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 6726
            • 7,075 Posts
            Sorry Ryan, I have just done another MODx install on the same server, with no need whatsoever to touch any permission/owner...

            It seems that it’s MODx related for the other install... I’ll have to dig to see why... First I’ll try the remove locks button maybe for some reason all documents got locked or whatever...

            Any other thing I might have to look for ?
            Thanks !
              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l'outil id
            • Garry Nutting Reply #6, 18 years ago
              Just curious, does the $site_sessionname in the config.inc.php match the site_id value in the system settings database table?

              I had very similar issue when I had to do a manual, hack ’n slash upgrade on my host and found the session name mismatch to be the problem.

              Hope that helps, Garry

                Garry Nutting
                Senior Developer
                MODX, LLC

                Email: [email protected]
                Twitter: @garryn
                Web: modx.com
                • 21255
                • 215 Posts
                Quote from: davidm at May 03, 2006, 02:32 PM

                Any other thing I might have to look for ?

                You could try to clear cache and see if it results in a (mostly) empty assets/cache directory. wink

                Also check php-errorlog if you have it somewhere. Did you already try to turn MODx debug mode on?
                  • 6726
                  • 7,075 Posts
                  Thanks Garry, thanks Timon !

                  It was neither of those problems... it seems there was an error during the export/import process of the DB. I discovered this when I tried to see if I could create a document...

                  I got this message :

                  An error occured while attempting to save the new document:
                  Unknown column ’publishedon’ in ’field list’

                  I’ll check the export and then re-do the import... thanks again for the help !

                  Edit : Hmmmm, I checked, nothing was omitted in the export... would I have been so dumb as to import a 0.9.1 DB into a 0.9.2.1 install huh I am beginning to wonder... Is publishedon a new field added since 0.9.1 ?

                  Stupid me, that was it !
                  I shouldn’t do this kind of thing late at night with a few glass of wine undecided

                  Sorry guys !
                  Solved, up and running smooth laugh
                    .: COO - Commerce Guys - Community Driven Innovation :.


                    MODx est l'outil id
                    • 27285
                    • 29 Posts
                    hi davidm!

                    what can I do when get this error:

                    An error occured while attempting to save the new document: Unknown column 'publishedon' in 'field list'



                    -----------------------------------------

                    sorry, i replied to quick - got it workig!
                      • 33114
                      • 518 Posts
                      Its very nice that u solved ur problems but... I got that "An error occured while attempting to save the new document: Unknown column ’publishedon’ in ’field list’" after udating some tables from 9.1 DB to newly installed 9.2.

                      according to davidm
                      Stupid me, that was it !
                      I shouldn’t do this kind of thing late at night with a few glass of wine Undecided

                      Sorry guys !
                      Solved, up and running smooth Cheesy

                      ...the solution was not drinking wine late at night. I didnt drink wine and so I do not have any solution ...

                      according to simon I should reply quick - and get it working.

                      So, what do I do when I have
                      An error occured while attempting to save the new document: Unknown column 'publishedon' in 'field list



                      UPD: Now, for my case the solution was REPEATING THE UPGRADE PROCEDURE.
                        http://modx.ru - российская поддержка MODx
                        http://newscup.ru - экспериментальный проект
                        http://yentsun.com - персональный сайт