We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22704
    • 42 Posts
    Hi,

    Folder/File Permission problem.

    I’m setting up MODx in a host that is new to me.
    www.heartinternet.co.uk (HI)

    I’ve created a subfolder public-html/modx.
    And installed by copying all the files up (rather than the raw installation process) from my Windows WAMP setup where I developed the site. I’ve previously copied the site onto my Webfaction account without problems.

    However, on HI nothing worked. Due to File Permission errors.

    I discovered that the host won’t allow sites to work unless folder/file permissions are 711 or 755 and 644 for PHP is advised. These permissions are from the Host(heartinternet.co. uk) and are not MODx specific. So is 711 or 755 appropriate and 644 for PHP?

    On this forum post - http://modxcms.com/forums/index.php/topic,32234.0.html there is a suggestion that cache folders and others need 775 or 777. Bizarrely using the HI File Manager 775 cannot be set... Presumably it can via SSH but I’ve discovered it takes 3 days to setup SSH (this appears to be a very security conscious host - good in a way but a pain just now). In their help "We do not allow scripts to run under 777 for reasons of security. Executable scripts should run under 711 or 755" So perhaps if the folders don’t contain PHP I’ll be okay but assets/cache does so... gulp.

    Raising a ticket with them just now to explore all this.
    Don’t suggest change hosts ;-) - I picked them and persuaded a client to change.

    Cheers
      • 27708 MODX Staff
      • 2,502 Posts
      Public folders should be fine at 755 and 644 for files. Your FTP app should allow you to set the permissions on your directories and files on upload.
        Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        This applies to all folders and files, PHP or no.

          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
          • 22704
          • 42 Posts
          Thanks all,

          I’m up and running with FURls on www.heartinternet.co.uk

          I got good support as they aren’t geared up for MODx support specifically so I have suggested they add a knowledgebase article on MODx. Hopefully they will do something. Busy time of year though.

          So, 755 for folders and 644 for everything else. Sorted.

          I also finally figured out ReWriteBase - they set you up on a Temporary URL at first so URL is (with modx subfolder)

          http://webblah.extendcp.co.uk/usersname.com/modx/

          So ReWriteBase /usersname.com/modx/ and not some path relative to public_html as I had assumed. Penny dropped.

          Cheers