1

In Template Manager I am trying to save my template (site/index) as a file. When I click update I get this error:

unable to save your template as a text file

I have asked around and searched and what I've seen is that it has to due with permissions or path to file, but I have tried messing around with both of those.

Thanks in advance.

MORE INFO-----

The template is called index and it is in the template group site: site/index

My Server path to site's templates is: /Documents/ExpressionEngine/unimin/expressionengine/templates

I am using:

ExpressionEngine Core (free version)
MAMP Pro
Mac OSX Mavericks
Google Chrome
1

I've found that with MAMP Pro I'm only able to save templates as files if I set the permissions on my templates folder to 777. Make sure you apply those permissions to the templates folder itself and its contents.

If you aren't sure how to change file permissions on your Mac, here is a help file from Apple. If you are using Finder to do it, as they show in this help file, 777 permission is "Read & Write" for everyone.

And you're right, the other thing to check is the server path to your templates folder. You edit that in Design > Template Manager > Global Template Preferences > Basepath to Template File Directory (assuming you are not using a config override).

If you still end up with trouble even after setting permissions to 777 and double checking the path, please post a little more information about your template setup (directory name, whether above webroot, etc) and the current server path you're specifying.

  • 2
    MAMP Pro also has a setting allowing you to change the user to run Apache under. I change this to my own account to be sure the server always has access to all of my files. For local use this works great. (It's a security disaster if you allow public access.) – Jeremy Gimbel Dec 5 '13 at 23:19
  • @alex When I try to change my permissions I don't have the option to change the numbers (777), all I see is: myuser - read & write, staff - read & write, everyone - read & write. How can I change the permissions correctly? Also I added some more details to my question to help you diagnose my issue. – MattCamp Dec 5 '13 at 23:53
  • @JeremyGimbel thanks for the tip. I changed it and nothing happened. What do you mean by allow public access? – MattCamp Dec 6 '13 at 2:04
  • 1
    Yes, there are. All subfolders and files contained in /templates need to have proper permissions, too! – Alex Kendrick Dec 6 '13 at 15:36
  • 1
    @AlexKendrick Ah I've just found my issue! My path was /Documents/ExpressionEngine/unimin/expressionengine/templates when it need to be /users/matthew/Documents/ExpressionEngine/unimin/expressionengine/templates -- silly mistake. Thanks for all the help! – MattCamp Dec 6 '13 at 15:59
1

Here are the steps to take to ensure you are setup to save templates as files:

  1. Check the file permissions of the templates folder and all the contents inside of it. They need to be set to 777 here is a link to help Mac users.

  2. Make sure your Global Template Preferences are set correctly. Step three of the linked documentation will help you for this.

  3. Check your server path to site's templates. Try adding a forward slash to the end (that has fixed it for several people).

Since I was using MAMP Pro my expressionengine was saved on my local device and my site path was not complete. For my sitepath I had: /Documents/ExpressionEngine/unimin/expressionengine/templates -- which should have been /users/matthew/Documents/ExpressionEngine/unimin/expressionengine/templates and that fixed it for me.

Also here are some other resources that might help you:

Resource 1 Resource 2 Resource 3 Resource 4

And of course make sure you read the ExpressionEngine Documentation

  • MattCamp, mark your answer as the correct one, please. – Stephen Callender Dec 9 '13 at 11:33
  • @StephenCallender Thanks, it wouldn't let me the same day I posted it so I forgot. Thanks for reminding me. :) – MattCamp Dec 9 '13 at 16:58
0

I'm not 100% sure but when I used WAMP the server path should be as normal i.e /localhost/public_html/sync rather than the folder location on your laptop/computer

  • Are you talking about the server path on EE or the directory on MAMP (WAMP)? – MattCamp Dec 6 '13 at 2:06
  • The server path in the Global Template preferences in EE, again I use WAMP (not sure how different MAMP is) but I assume it should still start with /localhost – MattPW Dec 6 '13 at 23:02
0

Change your file permissions in the command line/terminal using chmod 777 path/to/the/directory or, if you're not confident doing that, use an FTP client to alter the permissions to 777

You can also set your template path relative to your system directory rather than the server root which might make it simpler for you.

  • I have permissions set correctly. I am not sure what you are saying in your second paragraph? Can you explain a little more? – MattCamp Dec 6 '13 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.