CDash icon indicating copy to clipboard operation
CDash copied to clipboard

Install Security issues - Failed to open stream: Permission denied

Open doscherda opened this issue 2 years ago • 0 comments

While installing a fresh CDash ( v3.1.0-155) on a new AlmaLinux system, I had a lot of file permission issues. The standard solution of ensuring file/directory access from root (/) down to a file/directory was not solving the issues. For example, using a symlink from /var/www/cdash to /home/cdash/CDash/public, and then trying to start cdash from the Web for the first time:

Mar 7 09:56:00 cdash-scratch c-dash[878]: [2023-03-07 15:56:00] development.ERROR: file_put_contents(/home/cdash/CDash/storage/framework/views/c943f6a103408cf312f52d50cc38b92926b5887c.php): Failed to open stream: Permission denied {"exception":"[object] (ErrorException(code: 0): file_put_contents(/home/cdash/CDash/storage/framework/views/c943f6a103408cf312f52d50cc38b92926b5887c.php): Failed to open stream: Permission denied at /home/cdash/CDash/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:190)

Finally, I was able to determine that SELinux was actually the root cause of the problem. The system had SELinux enabled (see getenforce command) and was limiting file access.

It would be helpful to mention SELinux in the Installation documentation and that it might cause permission issues.

Ultimately, I turned SELinux off (see https://man7.org/linux/man-pages/man8/selinux.8.html) and CDash was able to install.

doscherda avatar Mar 07 '23 18:03 doscherda