Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Smarty cannot write to templates_c folder in Vagrant?

 
Post new topic   Reply to topic    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
jbyman
Smarty n00b


Joined: 02 Sep 2016
Posts: 2

PostPosted: Fri Sep 02, 2016 5:39 pm    Post subject: Smarty cannot write to templates_c folder in Vagrant? Reply with quote

Hello,

Apologies if this has already been asked or I am not in the right place for this. I am using a Vagrant box with Ubuntu with an Apache server, and am trying to install Smarty on this server. However, when I try to display a template, I am having permissions issues with Smarty trying to write to the templates_c folder.

Code:

Smarty: unable to write file /home/vagrant/controllers/templates_c/wrt57c9b00831c475_18277861


Does anyone know if there's some preference I am supposed to set to allow Smarty to write to folders on Ubuntu/Vagrant? Very stuck on this![/code]
Back to top
View user's profile Send private message
elpmis
Smarty Elite


Joined: 07 Jun 2007
Posts: 321

PostPosted: Sun Sep 04, 2016 7:22 pm    Post subject: Reply with quote

I'm not familiar with vagrant. But have you set chmod 777 for /template_c ?
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1642

PostPosted: Mon Sep 05, 2016 8:03 pm    Post subject: Re: Smarty cannot write to templates_c folder in Vagrant? Reply with quote

elpmis wrote:
chmod 777

Die.

jbyman wrote:
Code:

Smarty: unable to write file /home/vagrant/controllers/templates_c/wrt57c9b00831c475_18277861

You must fix permissions on that directory. It must have rwx for the user your PHP is running from.
Ususally, something like
Code:
chmod -R u=rwX,g=rsX,o= /home/vagrant/controllers/templates_c
chown -R <user> /home/vagrant/controllers/templates_c

should work.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Installation and Setup All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP