Problem with directory access right userfrosting centos7

Hi all

I have installed userfrosting on a centos 7 server, The installation happened with no error, but when I connect to the userfrosting URL http:\localhost\userfrosting\public I get the following screen output:

---------8< -------
Something’s not right here.

Please fix the following errors, then reload..

Incorrect permissions for file or directory.

/var/www/html/userfrosting/app/logs is not writeable, but it should be writeable. Please modify the OS user or group permissions so that user apache has write permissions for this directory.

Incorrect permissions for file or directory.

/var/www/html/userfrosting/app/cache is not writeable, but it should be writeable. Please modify the OS user or group permissions so that user apache has write permissions for this directory.

Incorrect permissions for file or directory.

/var/www/html/userfrosting/app/sessions is not writeable, but it should be writeable. Please modify the OS user or group permissions so that user apache has write permissions for this directory.

Apache module mod_rewrite is installed and enabled.

Great, we found the mod_rewrite Apache module!

PHP version checks out!

You're using PHP 5.6or higher. Great!

PDO is installed!

You've got PDO installed. Good job!

GD library installed!

Great, you have GD installed and enabled.

Function imagepng is available!

Sweet!

Function imagecreatetruecolor is available!

Sweet!

Function imagecolorallocate is available!

Sweet!

Function imagefilledrectangle is available!

Sweet!

Function imageline is available!

Sweet!

Function imagesetpixel is available!

Sweet!

Function imagefontwidth is available!

Sweet!

Function imagestring is available!

Sweet!

---------8< -------

It seems as if the apache user does not have write access to some directories but it has.

[root@analytics app]# pwd
/var/www/html/userfrosting/app
[root@analytics app]# ls -l
total 16
drwxr-xr-x.  3 apache apache   40 Sep  8 15:23 cache
-rwxr-xr-x.  1 apache apache 1867 Sep  8 14:35 defines.php
drwxr-xr-x.  2 apache apache   22 Sep  8 14:35 logs
drwxr-xr-x.  2 apache apache   22 Sep  8 14:35 sessions
drwxr-xr-x.  5 apache apache   46 Sep  8 14:35 sprinkles
-rw-r--r--.  1 apache apache  100 Sep  8 14:35 sprinkles.example.json
-rw-r--r--.  1 apache apache  100 Sep  8 15:16 sprinkles.json
drwxr-xr-x.  5 apache apache  146 Sep  8 14:35 system
drwxr-xr-x.  3 apache apache   70 Sep  8 14:35 tests
drwxr-xr-x. 35 apache apache 4096 Sep  8 14:37 vendor
[root@analytics app]#

Additionally I set acls to the complete path /var/www/html/userfrosting so that apache user has full access to all directories in the path.

Is there any hint what is going wrong here?

thanks Christian

Hi @kleegrwec,

Have you tried following the custom steps suggested for CentOS? See https://learn.userfrosting.com/installation/other-situations/centos.

The problem is that CentOS has SELinux turned on by default, which makes setting up the necessary permissions a little trickier.

Hi alexweissman

thanks for the reply. I found that npm and nodejs were older versions and I could update npm to version 5.3. Executing the other steps finally solved the problem of write permissions so that some content is displayed but this is not as expetced. I only see some ascii text and links and not the fancy graphical interface I expect. My browser shows lots of errors like:

Failed to load resource: the server responded with a status of 404 (Not Found)
bootstrap.css Failed to load resource: the server responded with a status of 404 (Not Found)
_all.css Failed to load resource: the server responded with a status of 404 (Not Found)
ionicons.css Failed to load resource: the server responded with a status of 404 (Not Found)
uf-jqueryvalidation.css Failed to load resource: the server responded with a status of 404 (Not Found)
select2.css Failed to load resource: the server responded with a status of 404 (Not Found)
uf-alerts.css Failed to load resource: the server responded with a status of 404 (Not Found)
AdminLTE.css Failed to load resource: the server responded with a status of 404 (Not Found)
AdminLTE-skins-all.css Failed to load resource: the server responded with a status of 404 (Not Found)
userfrosting.css Failed to load resource: the server responded with a status of 404 (Not Found)
127.0.0.1/:71 Google Analytics is disabled or code has not been set.
bootstrap.js Failed to load resource: the server responded with a status of 404 (Not Found)
jquery.validate.js Failed to load resource: the server responded with a status of 404 (Not Found)
jquery.slimscroll.js Failed to load resource: the server responded with a status of 404 (Not Found)
icheck.min.js Failed to load resource: the server responded with a status of 404 (Not Found)
handlebars.js Failed to load resource: the server responded with a status of 404 (Not Found)

I checked the userfrosting web application directories and found the css files e.g. in the path

app/sprinkles/core/assets/vendor/font-awesome/css/

But some configuration in the userfrosting web application still seems to be missing. Do you have any additional idea? It was the same with some ubuntu based installation I did before.

thanks, Christian

Have you checked that .htaccess usage is enabled for Apache? See https://learn.userfrosting.com/troubleshooting/common-problems#installation-went-fine-except-i-don-t-see-any-styling-on-my-home-page-i-am-using-apache-

Hi Alexweissmann

thanks for the help. Finally everything looks fine. I had to replace the Override directive plentyy of times since there were some directives for the userfrosting path.

best regards, Christian

1 Like