We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40045
    • 534 Posts
    I guess the messed up file permissions are coming from that line TheBoxer commented on here: https://github.com/modxcms/revolution/pull/11352, what PHP version are you using...the line in discussion seems to only work in PHP 5.5+...so quite possible that you ran into this and then you have permissions 0000 basically, which I had when working this out...was hairpulling^^...(because to delete the folder you have to manually re-set the permissions...sorry for that one if you experience the same problem...)

    you could actually just try to replace the unzip processor with the brand new class based one from here (last commit) https://github.com/modxcms/revolution/pull/11357, but then you also need the new unpack method for modfilehandler from here: https://github.com/modxcms/revolution/pull/11355

    Thanks for the hint with the log packing!
      • 40045
      • 534 Posts
      Quote from: sottwell at May 10, 2014, 06:30 AM
      Ran across something odd. Tried creating new_folder_permissions and new_file_permissions in System Settings, and no matter what I set the Area Lexicon Entry to it won't use a lexicon, even though setting_new_folder_permissions and setting_new_file_permissions are definitely in the setting.inc.php file. And updating the setting editing the name or description doesn't change those fields.

      you think that's connected to what we are trying to achieve here?
      • Well, I have two problems.

        One is that it doesn't work with the actual path of the zip file, it works with a Media Source base path. I can work around that by creating and using a media source - although it should be getting the path of the zip file and unzipping in its container folder.

        The other, which is worse, is that it's not using any kind of sane permissions for new folders or files. And once I cleared the cache, a new core/cache/logs has the crazy permissions.

        I tried creating the new system settings for permissions, but that didn't help. I don't know if the oddities I ran into when creating the new system settings has anything at all to do with the above problems.

        Perhaps I should specify that this is a clean 2.2.14 installation on OS X/MAMP.
          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
        • Ok. There's something flaky about that installation. Other odd things are happening. I'm starting over.
            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
          • I'm using PHP 5.5.10
              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
            • I'm sorry, I don't understand what I should do about the core/model/modx/processors/system/filesys/file/unzip.php?
                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
                • 40045
                • 534 Posts
                Quote from: sottwell at May 10, 2014, 04:06 PM
                I'm sorry, I don't understand what I should do about the core/model/modx/processors/system/filesys/file/unzip.php?

                my bad, was also a mess...cleaned it up a bit, for all relevant changes (including referenced xpdo class modifications!! Could be that this is maybe where it fails on your side) see here: https://github.com/modxcms/revolution/pull/11352

                maybe also I should test this on a clean 2.2.14 installation...maybe I missed to commit something I'm not aware of anymore^^...
                • Now I feel really stupid. I still don't know what I need to do to what files.

                  Is this instead of the core/model/modx/processors/system/filesys/file/unzip.php? Do I need to change the path to the unzip processor? Or do I replace the code in the unzip.php file?
                    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
                    • 40045
                    • 534 Posts
                    Quote from: sottwell at May 11, 2014, 01:20 AM
                    Now I feel really stupid. I still don't know what I need to do to what files.

                    Is this instead of the core/model/modx/processors/system/filesys/file/unzip.php? Do I need to change the path to the unzip processor? Or do I replace the code in the unzip.php file?

                    No need to feel stupid at all^^...you can't imagine how many hairs I pulled when implementing this stuff^^...

                    As promised I tested this on a clean 2.2.14pl traditional installation, the easiest way to do this was building a patch package which I'd like to offer to you, so maybe with this we can make it work also in your setup!

                    • Yes! Wonderful! Works perfectly.

                      This was the final feature needed to reduce all work into MODX. No need for FTP, external IDEs, nothing. Just 100% MODX.

                      Switched to PHP 5.1.6, and it still works just fine.

                      [ed. note: sottwell last edited this post 9 years, 11 months ago.]
                        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