We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    When a PHP script runs, it runs as the Apache web server user (usually apache, www, or nobody) while the files and folders in your html folder are owned by you. That means if you want a script (like modx) to be able to write files, like the cache files or upload image files, the folder they will be written to has to be world-writable (777). This includes the /manager/includes/config.inc.php that the install script has to write. But of course once it’s installed you don’t want everybody to be able to write to your config.inc.php file or the index.php files (one for the pages in the front end, one for the Manager), so you want them to be something like 622 (You, the owner, can read and write, everybody else can only read), while the assets/cache and assets/images folders still need to be world-writable for the scripts to be able to write them and upload images. Your html folder most definitely should not be 777.

    If you’re going to be operating a web site on a UNIX-like server (this includes Linux and OS X) you should learn the basics of file handling and permissions.

    The first number is for the owner, the second for the group the owner belongs to and the third is for everybody else.

    A 1 means it can be executed (as a program, like a perl script), or folders can be opened.
    A 2 means it can be written to. Add them, and a 3 means execute + write.
    A 4 means read. So a 6 means read + write, a 5 means execute + read, and 7 means execute + read + write.

    So 755 means you (owner) can open folders and read and write in them, and others of your group and everybody can open folders and read in them.

    622 means you can read and write a file, while everybody else can only read it.
      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
      • 15926
      • 27 Posts
      You are awesome thank you guys and girls all very much!