1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Saving templates permission denied

Discussion in 'Troubleshooting and Problems' started by Michael, Apr 25, 2013.

  1. Michael

    Michael Active Member

    Hey everyone,

    I keep getting permission denied when saving templates, the data and internal data folders are set to 777 including their subdirectories. Is this correct? What should the .data file permissions be as well as everything else under these two folders? 644?

    Thank you :)
     
  2. Andrej

    Andrej Well-Known Member

    You only need to CHMOD data and internal_date folders, not the subdirectories I believe.
     
    Michael likes this.
  3. Michael

    Michael Active Member

    Thank you, what should the subdirectories and files be?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    It must be recursive but regardless, templates aren't saved to those directories unless you have caching implemented.
     
    Michael and Andrej like this.
  5. Michael

    Michael Active Member

    It that recursive 777 on directories? I do have caching implemented and when saving a template/phrase I get the permission denied error.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Check the internal_data/templates directory permissions.
     
    Michael likes this.
  7. Michael

    Michael Active Member

    Just checked there and that directory is 777 and when I save a template it gives the error:

    file_put_contents(/public_html/internal_data/templates/S.10,L.1,account_personal_details.php): failed to open stream: Permission denied
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    Michael likes this.
  9. Michael

    Michael Active Member

    Thanks Brogan, it does seem to be an issue with that.
     
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    ^this^

    If you have shell access then try running these commands to recursively set permissions in those directories:

    Code:
    chmod -R 777 data
    
    chmod -R 777 internal_data
    
    You might also try 755 permissions. Depending on how PHP is installed, 755 may still be writable. I have seen some server configurations throw errors with 777.
     
    atmaca and Michael like this.
  11. Michael

    Michael Active Member

    Thanks Jake, I was unsure if the files were meant to be 777 too but it seems they are, all works well now :)
     

Share This Page