I am having an issue wherein creating a new template group results in this error:
Warning
mkdir(): Permission denied
ee/EllisLab/ExpressionEngine/Library/Filesystem/Filesystem.php, line 90
It throws that error ^ 4 times on the page.
Despite this, it creates the new Template Group and index.html file on the Template Manager page. However it does not create the new group as files in /system/user/templates/default_site/
If I try to create a new template group from the file system (rather than the Template Manager) it does show up in the Template Manager. However, any time I add a new template (either via the file system or via the Template Manager) I get the following error:
Warning
file_put_contents(user/templates/default_site/archive.group/archive.html): failed to open stream: Permission denied
ee/EllisLab/ExpressionEngine/Library/Filesystem/Filesystem.php, line 76
For starters, can anyone help shed some light as to what is going on? I’ve checked permissions up and down the /system/user/templates/default_site/
path, chmod’ing each dir to 777 just to see if that fixes the issue. Nope.
I’ve come across this thread/patch… https://expressionengine.com/support/bugs/21507/creating-template-group-results-in-errors-.-3.1
…but it looks like everything in the patch is standard issue for 3.5.10 now.
And secondly, is this something I can just overlook if I’m willing to deal with it? Or are there deeper issues at play here that’ll come to bite me if I don’t get this resolved? Preferably I’d like to get to the bottom of this and make the errors go away. But if it’s not going to prohibit me from coding new templates then I can begrudgingly deal with it if I have to.
And fwiw, I’m trying to do all this in my local environment. I’m on OS X / xampp / apache
I’m not a XAMPP user, so you might be able to get a more direct response in their support forums, asking for the proper owner, group, and permissions to use so that PHP can create files and folders. There’s no way that ExpressionEngine can work around that, it’s something at the PHP and environmental level that you’ll need to address. It is not an ignorable error. Just to confirm what you currently have those folders and files set to, open Terminal and cd path/to/system/user
, then:
ls -fla
And then
tree templates -p
Cut and paste the output of both of those commands here, please. Thanks!
Hi Derek, thanks for the reply. Here’s the info you asked for:
for ls -fla
drwxr-xr-x@ 8 nick staff 272 Aug 5 22:38 .
drwxr-xr-x@ 7 nick staff 238 Aug 5 22:38 ..
-rw-r--r--@ 1 nick staff 6148 Aug 6 21:23 .DS_Store
drwxr-xr-x@ 5 nick staff 170 Aug 5 22:38 addons
drwxrwxrwx@ 7 nick staff 238 Aug 7 22:26 cache
drwxr-xr-x@ 6 nick staff 204 Aug 7 22:26 config
drwxr-xr-x@ 3 nick staff 102 Aug 5 22:38 language
drwxr-xr-x@ 6 nick staff 204 Aug 5 22:38 templates
for tree templates -p
templates
├── [drwxr-xr-x] default_site
│ ├── [drwxr-xr-x] blog.group
│ │ ├── [-rw-r--r--] footer.html
│ │ ├── [-rw-r--r--] header.html
│ │ ├── [-rw-r--r--] index.html
│ │ ├── [-rw-r--r--] nav.html
│ │ └── [-rw-r--r--] podcast.feed
│ ├── [drwxr-xr-x] show_notes.group
│ │ ├── [-rw-r--r--] index.html
│ │ ├── [-rw-r--r--] left-col.html
│ │ ├── [-rw-r--r--] search_results.html
│ │ ├── [-rw-r--r--] show_notes-rss.feed
│ │ ├── [-rw-r--r--] show_notes_txt.html
│ │ └── [-rw-r--r--] topics.html
└── [-rw-r--r--] index.html
Ok it looks like you only have read and execute permissions on the directories for the Apache/PHP user (drwxr-xr-x
is 755, -rw-r--r--
is 644). Notice how your cache folder is drwxrwxrwx
; 777. Try adjusting the permissions again. Directories (including template
) to 777, and the template files themselves to 666.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.