Ubuntu Server 20.04.4 LTS, Kernel 5.4.0-109-generic
Apache 2.4.41, PHP 7.4.3
Issue
On a clean/fresh installation and I get the error message in the title and all other requirements are satisfied.
Web user / group is the default of www-data:www-data and owns the folders all the way down to /var/www. The path where the archive was extracted was /var/www/xibo/
Permissions for folders are set to 775 and files are 664 and should NOT be having any issue.
To verify this, I created a test.php file in the install folder that creates an output file called “test.log” and saved some text as proof Apache/PHP can write to the “web/install” folder. I then moved test.php to the parent “web” folder and performed the same test which successfully created the output file from a web browser.
This is the script I used to test write-ability:
<?php
error_reporting(E_ALL);
$filename = "test.log";
$myfile = fopen($filename, "w") or die("Unable to open file!");
$txt = "Hello World\n";
fwrite($myfile, $txt);
$user = fileowner($filename);
$txt = "Web UserID is ".$user."\n";
fwrite($myfile, $txt);
fclose($myfile);
if (is_readable($filename)) {
echo "$filename is readable<br>";
}
if (is_writable($filename)) {
echo "$filename is writable<br>";
}
if (is_executable($filename)) {
echo "$filename is executable<br>";
}
?>
Here is the output of a directory listing in “/var/www/xibo/web/install” after running test.php which created the test.log file:
Yes, because it is a brand new installation. The archive used to setup the system does not have one because it generates one during the install process…which is where I am seeing this error message. If you create an empty “settings.php” file, the installer will not run and will simply error out because the database connection info and other settings are not configured in the file.
The best practice is to allow the installation to have write access during initial setup but then remove write access once in production mode…which I did not get that far yet in the process. (but it needs to continue write access to the library folder for obvious reasons…which is also why it is not directly accessible from the web root)
i just try to install fresh 3.1.1 (with the same link) on my debian, and i got the same error about writing acces for settings.php even if there is no settings.php
NOTE: I was setting even less strict permissions earlier with folders set to 775 and files at 664 just for test purposes but the archives themselves use 755 / 644 for most everything so once I saw it work for 3.0.8, that is what I used.
Thank you for the quick fix. I have an ancient 1.7.8 installation that was initially put on an Ubuntu 16.04 server which I migrated to 18.04 with some back-reving of php for compatibility and was looking to see if I could install the latest version of Xibo onto the current version of Ubuntu 20.04 (well…22.04 when patch 1 comes out). We have a ton of licensed Android players but looking to replace them with Linux players but was surprised to find out that there doesn’t seem to be a need for any licensing in this scenario.
After a quick test, v3.0.8 is working with a Windows player with relative ease (I did need to play around a bit to learn the different interface compared to 1.7.8). I am working on a how-to article for Xibo on my spare time. Hopefully I will be allowed to finish it. https://hammondslegacy.com/forum/viewtopic.php?f=40&t=300