Setup Permission Issue During Setup - Not reflect after change permission

Hi Guys,

In regarding to the permission on prerequisites installation i’ve follow the resolution based on the previous cases, eg:
[Solved] Setup permission errors
[Solved] Install InvoicePlane on subdomain

But none of it workable for me.
My issue as below.

image

As above prerequisites, it showing that :

./ipconfig.php is not writable
./application/logs is not writable

below is the file permission which I set to 777 & 755 it still showing no writable.

[root@labtest html]# ls -lh
total 2.1M
drwxrwxrwx. 16 apache apache  247 Nov 17 16:45 application
drwxr-xr-x.  5 apache apache   81 Nov 17 16:45 assets
-rw-r--r--.  1 apache apache  382 Nov 17 16:45 composer.json
-rw-r--r--.  1 apache apache  90K Nov 17 16:45 composer.lock
-rwxr-xr-x.  1 apache apache 1.8M Nov 16 14:10 composer.phar
-rw-r--r--.  1 apache apache 2.4K Nov 17 16:45 CONTRIBUTING.md
-rw-r--r--.  1 apache apache 2.7K Nov 17 16:45 DEVELOPMENT.md
-rw-r--r--.  1 apache apache  724 Nov 17 16:45 Dockerfile
-rw-r--r--.  1 apache apache 5.9K Nov 17 16:45 Gruntfile.js
-rw-r--r--.  1 apache apache  640 Nov 17 16:45 htaccess
-rwxr-xr-x.  1 apache apache  11K Nov 17 16:45 index.php
-rwxrwxrwx.  1 apache apache 1.5K Nov 17 16:46 ipconfig.php
-rw-r--r--.  1 apache apache 1.5K Nov 17 16:45 ipconfig.php.example
-rwxr-xr-x.  1 apache apache 5.0K Nov 17 16:45 LICENSE.txt
-rw-r--r--.  1 apache apache 1.2K Nov 17 16:45 package.json
-rw-r--r--.  1 apache apache  84K Nov 17 16:45 package-lock.json
-rwxr-xr-x.  1 apache apache 3.0K Nov 17 16:45 README.md
-rw-r--r--.  1 root   root    133 Nov 17 17:29 req.out
-rw-r--r--.  1 apache apache   25 Nov 17 16:45 robots.txt
drwxr-xr-x.  6 apache apache  111 Nov 17 16:45 uploads
drwxr-xr-x. 14 apache apache  209 Nov 17 16:46 vendor
[root@labtest html]# ls -lh application/
total 20K
drwxr-xr-x.  2 apache apache   41 Nov 17 16:45 cache
drwxr-xr-x.  2 apache apache 4.0K Nov 17 16:45 config
drwxr-xr-x.  2 apache apache   43 Nov 17 16:45 controllers
drwxr-xr-x.  2 apache apache 4.0K Nov 17 16:45 core
drwxr-xr-x.  2 apache apache  111 Nov 17 16:45 errors
drwxr-xr-x.  3 apache apache 4.0K Nov 17 16:45 helpers
drwxr-xr-x.  2 apache apache   52 Nov 17 16:45 hooks
-rwxr-xr-x.  1 apache apache  118 Nov 17 16:45 index.html
drwxr-xr-x.  3 apache apache   39 Nov 17 16:45 language
drwxr-xr-x.  2 apache apache  129 Nov 17 16:45 libraries
drwxrwxrwx.  2 apache apache   42 Nov 17 16:45 logs
drwxr-xr-x.  2 apache apache   24 Nov 17 16:45 models
drwxr-xr-x. 31 apache apache 4.0K Nov 17 16:45 modules
drwxr-xr-x.  3 apache apache   34 Nov 17 16:45 third_party
drwxr-xr-x.  7 apache apache  115 Nov 17 16:45 views
[root@labtest html]#

I do have my rewrite_module enabled as well.

[root@labtest html]# httpd -M | grep rewrite_module
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::20c:29ff:fe09:5134. Set the 'ServerName' directive globally to suppress this message
rewrite_module (shared)
[root@labtest html]#

Please advise on this.
Thank you in advance.

I think you have some other problems because the setup is not looking like it should look…
Please check your browser for any 404 errors.

Hi Kovah,

Thank you for your quick respond.

image

As above screenshot, I didnt faced any 404 error.
Below is the errorlog from my server. No abnormal error…

[Fri Nov 17 17:55:28.349956 2017] [mpm_prefork:notice] [pid 14879] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/7.0.25 configured -- resuming normal operations
[Fri Nov 17 17:55:28.350001 2017] [core:notice] [pid 14879] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Fri Nov 17 17:58:23.030688 2017] [mpm_prefork:notice] [pid 14879] AH00170: caught SIGWINCH, shutting down gracefully



[Fri Nov 17 17:59:19.454170 2017] [core:notice] [pid 14982] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Fri Nov 17 17:59:19.454847 2017] [suexec:notice] [pid 14982] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::20c:29ff:fe09:5134. Set the 'ServerName' directive globally to suppress this message
[Fri Nov 17 17:59:19.483466 2017] [auth_digest:notice] [pid 14982] AH01757: generating secret for digest authentication ...
[Fri Nov 17 17:59:19.483937 2017] [lbmethod_heartbeat:notice] [pid 14982] AH02282: No slotmem from mod_heartmonitor
[Fri Nov 17 17:59:19.483981 2017] [ssl:warn] [pid 14982] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Nov 17 17:59:19.512928 2017] [mpm_prefork:notice] [pid 14982] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/7.0.25 configured -- resuming normal operations
[Fri Nov 17 17:59:19.512959 2017] [core:notice] [pid 14982] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

Any other configuration i need to look for?

Sorry but these logs do not help. Please check for errors inside your browser (developer tools > network tab). Please google if you don’t know how to do so.

Got it.

Saw 404 error but these two files is not exist.

[root@labtest html]# cd assets/core/js/
[root@labtest js]# ls
jquery-ui.js  locales  scripts.js
[root@labtest js]# ls -lh
total 196K
-rw-r--r--. 1 apache apache 182K Nov 17 16:45 jquery-ui.js
drwxr-xr-x. 2 apache apache   24 Nov 17 16:45 locales
-rwxr-xr-x. 1 apache apache 8.1K Nov 17 16:45 scripts.js
[root@labtest js]# locate dependencies.min.js
[root@labtest js]# cd ../../
[root@labtest assets]# cd invoiceplane/css/
[root@labtest css]# ls -lh
total 0
[root@labtest css]#

I downloaded the files from the github.

Please download the package from the website. The github repository is for developers only.

No more 404 error. Permission issue still persist.
Does it could be on server side?.

Maybe user permissions or something like that?

I had verified, the file & folder permission is 777 .

drwxrwxrwx. 16 apache apache  247 Nov 16 13:45 application
drwxr-xr-x.  5 apache apache   81 Nov 16 13:45 assets
-rw-r--r--.  1 apache apache  382 Nov 16 13:45 composer.json
-rw-r--r--.  1 apache apache  90K Nov 16 13:45 composer.lock
-rwxr-xr-x.  1 apache apache 1.8M Nov 16 14:10 composer.phar
-rw-r--r--.  1 apache apache 2.4K Nov 16 13:45 CONTRIBUTING.md
-rw-r--r--.  1 apache apache 2.7K Nov 16 13:45 DEVELOPMENT.md
-rw-r--r--.  1 apache apache  724 Nov 16 13:45 Dockerfile
-rw-r--r--.  1 apache apache 5.9K Nov 16 13:45 Gruntfile.js
-rw-r--r--.  1 apache apache  630 Nov 17 11:40 htaccess
drwxr-xr-x.  6 apache apache 4.0K Nov 17 19:30 html
-rwxr-xr-x.  1 apache apache  11K Nov 16 13:45 index.php
drwxr-xr-x.  3 apache apache   57 Nov 16 13:46 InvoicePlane
-rwxrwxrwx.  1 apache apache 1.5K Nov 16 14:01 ipconfig.php
-rwxr-xr-x.  1 apache apache 5.0K Nov 16 13:45 LICENSE.txt
drwxr-xr-x. 10 apache apache 4.0K Nov 17 10:32 mpdf
-rw-r--r--.  1 apache apache 1.2K Nov 16 13:45 package.json
-rw-r--r--.  1 apache apache  84K Nov 16 13:45 package-lock.json
-rw-r--r--.  1 apache apache   20 Aug 14  2015 phpinfo.php
-rwxr-xr-x.  1 apache apache 3.0K Nov 16 13:45 README.md
-rw-r--r--.  1 apache apache   25 Nov 16 13:45 robots.txt
drwxrwxrwx.  6 apache apache  111 Nov 16 13:45 uploads
drwxr-xr-x. 14 apache apache  209 Nov 17 10:53 vendor

I was running on CentOS 7, 64bit previously & last night I had setup another server CentOS 6 64bit & successfully installed Invoice Plane on CentOS 6 64bit without any single error.

Unknown caused related to CentOS 7.

thank you for this information!

Hi Kovah
I just upgraded to Fedora 27 and am now experiencing exact same problem.
Has Invoice Plane been successfully installed on the version. Previous version worked like a dream.

This blog post will explain your issue in detail:
https://www.svnlabs.com/blogs/centos-7-selinux-apache-php-writeaccess-permission/

Basically CentOS 7 SELinux installed by default that is protecting you by not allowing you to change .php files all willy nilly.

This is the command you are looking for to disable those SELinux Protections
#chcon -Rv --type=httpd_sys_rw_content_t /var/www/html/

1 Like

Thanks Benjamin, it solved it for me too under Centos7