We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11054
    • 59 Posts
    I've seen this error posted in a lot of different threads, but I haven't been able to resolve it with any of the solutions.

    I have 1.0.5 Evo installed (a fresh install) and I'm still getting this error message anytime I try to upload a file (image, pdf, or other). All folders set to 777CHMOD

    I've tried MANY different variables on the File Base Path and File Browser URL areas of the Configuration area. I'm finally stuck with this issue, and need help.

    Currently they are:
    File base Path: /usr/www/users/[mysite]/assets/
    File Browser: assets/
    File Manager path: /usr/www/users/[mysite]/

    This has never happened on other hosts, so I'm wondering if it could be something with the web server that is messing up the upload process. Has anyone ever heard of something like this? [ed. note: golds30 last edited this post 14 years, 11 months ago.]
      • 3749
      • 24,544 Posts
      If the host is using suExec or suPHP (many are), the folders need to be 755 and the files 644.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 11054
        • 59 Posts
        Thanks for the response. I changed all of the directories to 755, and it's still not uploading. And, now when I go into the back end manager there's an error on the dashboard that says the images folder isn't writeable with 755CHMOD.

        The one small change is that when uploading images, the progress bar at the bottom of the file browser gets to about 50% and then the error pops-up. Not sure if this is significant.

        The file upload still alerts the error immediately. And, I noticed that on the file manager you can't see any of the thumbs of the files that I already uploaded before this issue began. Would that point to an incorrect path in the configuration area?

        I've also asked my host about the suPHP, and found that it wasn't turned on. Should I maybe try turning it on? [ed. note: golds30 last edited this post 14 years, 11 months ago.]
          • 1343 ☆ A M B ☆
          • 2,213 Posts
          Hello,

          The correct permissions should be 666/777 without suphp. Your upload problem could be related to the file/folder owner, so you may want to consult your host to check on that possibility.

          If you change to suphp (which I generally recommend), you need to update all files/folder to 644/755 permission and make sure the owner is the account user. This configuration tends to cause less problems and works well in shared environments (multi users/sites on the server).
            Patrick | Server Wrangler
            About Me: Website | Tweets |  MODX Hosting
            • 11054
            • 59 Posts
            Interesting that you mention multiple sites (shared environments) because I did recently install a second site on this server - this hadn't even crossed my mind as a cause of the issue.

            The response from the host was that it was definitely a file ownership issue, but also said that SuExec was going to make the situation worse (hard to imagine since it already isn't working...).

            I took a look at the owners for the directories where I was having problems uploading to, the images and files folders, and it said that the owner was "unknown." Furthermore, I'm not sure how to change the owner on these directories. I don't see a way to do it through my FTP client, nor on the server back end. Any thoughts?

            As per AMDBuilder's suggestion, I went with a test of turning on the suExec, and it didn't seem to change anything. I changed all the folders to 755, and the files to 644.

            Can someone advise on how to change the directory ownership, and who to change the owner to?


            UPDATE:
            I have a hunch that there might have been something wrong on the server when I added a second website that had an URL that was added on. I've since removed the second site, and moved it to a different server.

            Can someone advise on how I could restore the original ownership and permissions to these directories? If I upgrade the site, will it restore the directory ownership to MODx? I can't just change the ownership on my webserver through any methods can I? [ed. note: golds30 last edited this post 14 years, 11 months ago.]