By catalinmn
I just setup a new droplet on which I unzipped a prestashop installation.
I get this error when trying to access the admin area:
PHP Fatal error: Uncaught --> Smarty: unable to write file /var/www/testapp/public_html/cache/smarty/compile/9b/4f/93/wrt5513f60bb63d41_15387074 <-- \n thrown in /var/www/testapp/public_html/tools/smarty/sysplugins/smarty_internal_write_file.php on line 46
I’ve tried the following without any luck:
codesudo chown -R www-data:www-data /var/www/testapp/public_html/
sudo chown -R $USER:$USER /var/www/testapp/public_html/
tried with permissions 777 over cache folder - still doesn't work
Any suggestions? I’ve found many other users with this problem but none of their fixes worked for me.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This comment has been deleted
If you logged as root user don’t use this ($USER:$USER) like below,
sudo chown -R $USER:$USER /var/www/testapp/public_html/
you should use this code for, give the permissions
sudo chmod -R 755 /var/www
please recreate your droplet (instance) and try again.
for more details https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04
We can use the $USER environmental variable to assign ownership to the account that we are currently signed in on (make sure you’re not logged in as root). This will allow us to easily create or edit the content in this directory:
@catalinmn and @MatthewTV I know this comes a few years after the initial discussion, but I have a scenario here…
I applied the above solution:
find /var/www/testapp/public_html/cache -type d -exec chmod 755 {} ; find /var/www/testapp/public_html/cache -type f -exec chmod 644 {} ;
And now my XAMPP app does not want to open anymore.
I am using a Mac.
Any suggestions how to approach this issue?
I have been struggling with this mysql/xampp/apache startup for 2 days now…
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.