We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4971
    • 964 Posts
    I am in the process of upgrading two of my sites from Revo 2.0.8 to 2.1.1
    and I am getting some error that I attribute so far to being unable to
    delete the core/cache files.

    I am unable to erase those files from my hosting account because MODX is
    creating them (cache files, but it happens also with files created by PackMan)
    with a "nobody" user, so it does not recognize me as its owner and denies
    permission to delete.

    My host has to go and delete them for me or change the permission so I can delete
    them, which is not a solution, because I cannot be going to them every time I want
    to delete one of this files.

    What can I do to fix this?

    The other side of the issue is that I must be the only one with this problem, so maybe
    it is not a MODX issue but a hosting environment issue, but what?

    Any advice is appreciated... TIA
      Website: www.mercologia.com
      MODX Revo Tutorials:  www.modxperience.com

      MODX Professional Partner
      • 18463
      • 121 Posts
      Martijn van Turnhout Reply #2, 15 years, 3 months ago
      It’s a hosting environment issue. I’m currently having the same situation with 1 hosting provider with exactly the same, but with the other provider, I can delete and add whatever I want.
        • 4971
        • 964 Posts
        Have they given you any advice?

        My host, which is very good, tells me that it is the website (MODX)
        that creates the files with the "nobody" owner. And indeed,
        those are the files that I cannot delete (cached files in core/cache and
        PackMan created files after a package creation).

        The files that I upload myself, I can delete and move at will because
        they have the right permission (I am not talking about the writing permission
        like 777, but the server permissions like 955 955).
          Website: www.mercologia.com
          MODX Revo Tutorials:  www.modxperience.com

          MODX Professional Partner
          • 26903
          • 1,336 Posts
          Its not MODX, its apache,
          ....Apache can give up its rights and run as nonroot user, as specified in its configuration files. By default, this is the user nobody..."
          . On Redhat systems this happens to be user apache, not nobody, but it doesn’t matter which account is used, its not yours so you can’t delete the files.
            Use MODx, or the cat gets it!
            • 4971
            • 964 Posts
            Thanks Steve,

            The server where my accounts reside uses CentOS, which derives from RedHat...

            so what is the solution or a solution to this?
              Website: www.mercologia.com
              MODX Revo Tutorials:  www.modxperience.com

              MODX Professional Partner
              • 23571
              • 223 Posts
              For us it was to start using PHPSuExec, the ownership of the site files will be the same as the FTP user, rather than root.
                • 4971
                • 964 Posts
                Interesting greg, I will ask my host to see if they can install it.

                Why does the core/cache files and directories are not deleted when
                we clear the cache from the manager?
                Is the same thing happening? cant delete them because of the wrong owner?
                  Website: www.mercologia.com
                  MODX Revo Tutorials:  www.modxperience.com

                  MODX Professional Partner
                  • 18373 ☆ A M B ☆
                  • 3,141 Posts
                  Quote from: pleth at Jun 07, 2011, 03:56 PM

                  For us it was to start using PHPSuExec, the ownership of the site files will be the same as the FTP user, rather than root.

                  ^ The server my site runs on uses that and it’s a *great* relief.

                  One work around if you can’t get PhpSuExect is to delete from the files tab in the manager, as that uses the same user as MODX/packman etc.


                  Quote from: charliez at Jun 07, 2011, 04:22 PM

                  Why does the core/cache files and directories are not deleted when
                  we clear the cache from the manager?
                  Is the same thing happening? cant delete them because of the wrong owner?

                  You sure it’s not deleting anything? I think 2.1 regenerates the cache when clearing (it refreshes, doesn’t clear) so it may seem nothing is going on.
                    Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                    Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                    • 4971
                    • 964 Posts
                    I would try that, but I cannot access the manager because it is giving me an error:


                    Fatal error: Call to undefined method modX::getUserDocGroups() in /home2/modxperi/public_html/core/components/wayfinder/wayfinder.class.php on line 461

                    which I assume is caused by not deleting all the files on core/cache directory.

                    So I am kinda stuck in the 2.0.8-to-2.1.1 limbo !!! hehehe


                    I cleared the cache using the 2.0.8 manager and using Janitor,
                    and the files are still there when seen via Filezilla and phpMyAdmin
                      Website: www.mercologia.com
                      MODX Revo Tutorials:  www.modxperience.com

                      MODX Professional Partner
                      • 18373 ☆ A M B ☆
                      • 3,141 Posts
                      That’s actually including a file, and isn’t cached.

                      Few ideas:
                      - Attempt to delete that specific file. Guessing it wont work cause you installed it w/ the pkg mgr, but you never know.
                      - Open up the DB and edit the wayfinder snippet, comment out the line including the class (or just the whole thing!). I’m guessing you’re getting that error when it wants to generate the wayfinder cache (don’t know how else it would be triggering a snippet trying to load the manager)


                      Something that you can try is creating a simple php file and from there try to chmod() some files. If you do it right you can make it recursively chmod entire folders. There may be some copy/paste snippets out there on Google that do just that.

                      I’m going to add a note to the upgrading doc to make sure you have updated all addons to the latest versions and to check custom devved ones too, you’re not the first that had issues after updating, tho you are the first that I know off that got totally locked out laugh lol
                        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.