{"id":132,"date":"2011-09-26T09:18:32","date_gmt":"2011-09-26T01:18:32","guid":{"rendered":"http:\/\/karyleong.net\/?p=132"},"modified":"2011-09-26T09:18:32","modified_gmt":"2011-09-26T01:18:32","slug":"symfony-2-cant-not-write-cache-files","status":"publish","type":"post","link":"https:\/\/karyleong.net\/?p=132","title":{"rendered":"Symfony 2 can&#8217;t not write cache files"},"content":{"rendered":"<h3>1. Using ACL on a system that supports chmod +a<\/h3>\n<p>Many systems allow you to use the &#8220;chmod +a&#8221; command. Try this first, and if you get an error &#8211; try the next method:<\/p>\n<div>\n<div>\n<div>\n<div>\n<div>rm\u00a0-rf\u00a0app\/cache\/*<br \/>\nrm\u00a0-rf\u00a0app\/logs\/*<\/p>\n<p>sudo\u00a0chmod\u00a0+a\u00a0&#8220;www-data allow delete,write,append,file_inherit,directory_inherit&#8221;\u00a0app\/cache app\/logs<br \/>\nsudo\u00a0chmod\u00a0+a\u00a0&#8220;yourname allow delete,write,append,file_inherit,directory_inherit&#8221;\u00a0app\/cache app\/logs<\/p><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h3>2. Using Acl on a system that does not support chmod +a<\/h3>\n<p>Some systems don&#8217;t support &#8220;chmod +a&#8221;, but do support another utility called &#8220;setfacl&#8221;. You may need to\u00a0<a href=\"https:\/\/help.ubuntu.com\/community\/FilePermissions#ACLs\">enable ACL support<\/a>\u00a0on your partition and install &#8220;setfacl &#8220;before using it (as is the case with Ubuntu), like so:<\/p>\n<div>\n<div>\n<div>\n<div>\n<div>sudo\u00a0setfacl\u00a0-R\u00a0-m\u00a0u:www-data:rwx\u00a0-m\u00a0u:yourname:rwx app\/cache app\/logs<br \/>\nsudo\u00a0setfacl\u00a0-dR\u00a0-m\u00a0u:www-data:rwx\u00a0-m\u00a0u:yourname:rwx app\/cache app\/logs<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>1. Using ACL on a system that supports chmod +a Many systems allow you to use the &#8220;chmod +a&#8221; command. Try this first, and if you get an error &#8211; try the next method: rm\u00a0-rf\u00a0app\/cache\/* rm\u00a0-rf\u00a0app\/logs\/* sudo\u00a0chmod\u00a0+a\u00a0&#8220;www-data allow delete,write,append,file_inherit,directory_inherit&#8221;\u00a0app\/cache app\/logs sudo\u00a0chmod\u00a0+a\u00a0&#8220;yourname allow delete,write,append,file_inherit,directory_inherit&#8221;\u00a0app\/cache app\/logs 2. Using Acl on a system that does not support chmod &#8230; <a title=\"Symfony 2 can&#8217;t not write cache files\" class=\"read-more\" href=\"https:\/\/karyleong.net\/?p=132\" aria-label=\"More on Symfony 2 can&#8217;t not write cache files\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/karyleong.net\/index.php?rest_route=\/wp\/v2\/posts\/132"}],"collection":[{"href":"https:\/\/karyleong.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/karyleong.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/karyleong.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/karyleong.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=132"}],"version-history":[{"count":1,"href":"https:\/\/karyleong.net\/index.php?rest_route=\/wp\/v2\/posts\/132\/revisions"}],"predecessor-version":[{"id":133,"href":"https:\/\/karyleong.net\/index.php?rest_route=\/wp\/v2\/posts\/132\/revisions\/133"}],"wp:attachment":[{"href":"https:\/\/karyleong.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/karyleong.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/karyleong.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}