We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22840
    • 1,572 Posts
    Quote from: charliez at Jun 07, 2011, 01:49 PM

    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

    Don’t know who you use as a host but I would suspect that they can override the server permissions for your account so that "nobody" does not get ownership of the files and the root account owner does, is it a reseller account or just separate accounts with different hosts ?
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      Oh, that reminded me, there’s a system setting or config option somewhere to change the default permissions files and directories get. You may want to look into that to set it to a looser level to prevent you from being locked out all over again.
        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
        @Mark:
        THanks for the ideas. To clarify, I am not having problems with the files/dir permissions, I mean the rwx(777) permissions, but with the server user permissions. I got access to the manager now (dont know what happened).

        Your idea to erase the files from the manager did not work, I guess is the same permission denial, which is the problem because the OS is creating them with the nobody user as owner.

        @paulp:
        It is an account under my reseller account. So the host has root ownership, I (and my clients) have user permissions, but there is an intermediate Apache user named "nobody" which was "invented" so that files and directories created by web services will not be created with root ownership. So when MODX created files using PHP, the files are created by "nobody" and when I want to delete them, well I cant.

        The host is very good and nice and are willing to change the permissions to me or delete the files for me,
        but I want a more permanent solution instead of having them do that for me.


        I will deal with the upgrade error, the Wayfinder error Mark, once I have solved the cache one, so I dont
        start creating a huge snowball of problems...
          Website: www.mercologia.com
          MODX Revo Tutorials:  www.modxperience.com

          MODX Professional Partner
          • 22840
          • 1,572 Posts
          Is this a dedicated server or shared ?

          If you get the host to install suPHP then that should resolve the problems.

          More info http://www.suphp.org/Home.html
            • 19388
            • 297 Posts
            As other has told you, suPHP or PHPSUEXEC is a solution because it will change not only permissions for uploaded files but owner too. It’s more than possible that your hosting provider wouldn’t want to install it because it involves a lot of things I think.
            But you can try a "patch". Create a phpscript to change user owner, then, try to delete it.
            http://php.net/manual/en/function.chown.php

            Or try to delete it from php instead.

            The real solution is on your hosting provider side, and it’s install suPHP/phpsuexec.
              • 4971
              • 964 Posts
              Thanks to all of you guys for your help and advice.

              I have been scheduled to be moved to a server with suPHP
              that will fix all these issues, I guess my server config
              is old, around 4-5 years old and it will be a pain to
              install in that server.

              On the bright side, the server is newer and faster !!
                Website: www.mercologia.com
                MODX Revo Tutorials:  www.modxperience.com

                MODX Professional Partner
                • 473
                • 70 Posts
                modx system must using ftp layer for create/copy/delete file like Joomla do