Correct permissions for Writable folder? |
Could somebody show me what permissions do I need to setup for Writable and it's sub folders?
I am getting this error CodeIgniter\Cache\Exceptions\CacheException Cache unable to write to /var/www/myproject/writable/cache/ I am on Ubuntu 18.04 using CI4 beta 1.
(03-08-2019, 10:35 AM)happyape Wrote: Could somebody show me what permissions do I need to setup for Writable and it's sub folders? writable folder and child folders must be owned by web server process, in my Linux Centos is apache (production) chown -R apache /var/www/myproject/writable Or allowing total control to everyone (development) chmod 777 -R /var/www/myproject/writable (03-08-2019, 12:26 PM)elephpantech Wrote:(03-08-2019, 10:35 AM)happyape Wrote: Could somebody show me what permissions do I need to setup for Writable and it's sub folders? As you are on Ubuntu, if you have root access you can set chown -R www-data:www-data var/www/myproject/writable
Or 775 776
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
If your dir permissions are correctly set, worth taking a look at this as it could be to do with permissions of the httpd in SELinux.
This worked for me (Centos7): A simple check to validate: 1) Create test.php in app root <?php file_put_contents("/var/www/html/<codeigniterpath>/writable/test.txt", "test"); 2) Execute it from command line. It should create the file with test inside. Then delete test.txt. 3) Call from browser https://url/test.php If it doesn't create, check /var/log/audit.log, look for "denied { write } " relating to the httpd/apache. If you find these entries, then it might be to do with permissions for httpd in SELinux. Try: chcon -Rv --type=httpd_sys_rw_content_t /var/www/html/<codeigniterpath>/writable/ or google "SELinux apache write permissions" for clues
File permissions table:
The mode parameter consists of four numbers: 1) The first number is always zero 2) The second number specifies permissions for the owner 3) The third number specifies permissions for the owner's user group 4) The fourth number specifies permissions for everybody else Possible values (to set multiple permissions, add up the following numbers): 1 = execute permissions 2 = write permissions 4 = read permissions What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |