We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25940
    • 8 Posts
    Okay, hopefully this won’t sound too dumb. I’m still trying to figure out all this about file and folder permissions.

    The server I would like to install MODx on is at Hostgator. They have switched to running SuExec on all their servers now. I read the other post and the wiki article about installing with SuExec. But what I would like to know is if I can just change all the permissions on all the files to make the server happy.

    See, Hostgator has this little tool that checks for potential 500 Internal Server Errors in your files. It returns "Warning! File writable by others." on almost all of the MODx files because they are group writable. I’d like to get rid of that. Even if MODx installs and runs fine, those still bother me. Maybe it’s nothing to worry about, but I’d like to be able to at least use that tool without having to scan through hundreds of warnings to see any new ones.

    So what will happen if I change all the files to 644 and directories to 755 before I upload the MODx package to the server? Or after the install? Will it cause any problems? And how can I do this automatically, without having to go through and change each file individually?

    I’d really like to use MODx. I’m pretty much sold on it now. And I don’t really want to change hosts to find one without SuExec. I’m pretty much convinced that it’s a good idea.

    Thanks for any input.
      • 25940
      • 8 Posts
      Now that I’ve finally got the time to work on my site, and learned enough about MODx to get a lot of it running, I can give an answer to this if anyone else was interested.

      So far it all appears to be working just fine.

      I uploaded all the MODx files to the server and changed the file permissions on everything as I did that. (For Windows users, EmFTP is an FTP program that will let you set permissions on files as you transfer them. There is a free trial version of it, too.) I changed every directory to 755 and every other file to 644.

      Then I followed the instructions at the wiki http://wiki.modxcms.com/index.php/Securing_your_site. Every new file MODx creates also has those permissions, now.

      I have not run into any problems so far, so I guess MODx and suExec can play nice together. smiley
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        I’ve been insisting on suexec for all my hosting for some time now. It really makes me nervous having world-writable permissions on any of my files or directories. I even go so far as to set my config.inc.php file to read-only. If I need to change it for some reason, then I have to change permissions on it first.
          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