revival-adserver /var permissions

Even after running chmod -R a+w on adserver/var, still getting this problem.

Looks like it is a problem with PHP

File permission errors have been detected, and must be fixed before you can continue.
To fix the errors on a Linux system, try typing in the following command(s):
chmod -R a+w /home/a2z/public_html/adserver/var
For more help, please see the Revive Adserver documentation.
Status: 
Active

Comments

Howdy -- thanks for contacting us!

What PHP Execution Mode is it that you're using there?

You can see that in Server Configuration -> Website Options.

That's odd, because Virtualmin explicitly makes that var directory writable as part of the install. Also, if it's owned by the domain owner and PHP scripts run in FPM mode, they should also have permissions to write to it.

Could you try creating a file named "test.php" in the public_html folder, and for it's contents, add the following:

<?php phpinfo(); ?>

Then, can you share the resulting URL with us so we can see the phpinfo output? Thanks!

Yup, that looks good -- it's set to use FCGID in Virtualmin, and I can see in that output that FCGID is working.

The next step would be to look at the folder in question -- what output do you see when running these commands:

ls -la /home/a2z/public_html/adserver/var
ls -la /home/a2z/public_html/adserver
[a2z@edge adserver]$ ls -la /home/a2z/public_html/adserver/var
total 96
drwxrwxrwx 5 a2z a2z   153 Oct 27 05:18 .
drwxr-xr-x 9 a2z a2z  4096 Oct 28 16:22 ..
lrwxrwxrwx 1 a2z a2z    56 Oct 27 04:45 a2z.blue.conf.php -> /home/a2z/public_html/adserver/var/www.a2z.blue.conf.php
drwxrwxrwx 2 a2z a2z  4096 Oct 27 04:56 cache
-rw-rw-rw- 1 a2z a2z 60617 Oct 28 16:27 debug.log
-rwxrwxrwx 1 a2z a2z   196 Oct 27 04:45 .htaccess
-rw-rw-rw- 1 a2z a2z 17784 Oct 28 16:27 install.log
drwxrwxrwx 4 a2z a2z    58 Oct 27 04:45 plugins
drwxrwxrwx 2 a2z a2z  4096 Oct 27 04:56 templates_compiled
-rwxrwxrwx 1 a2z a2z     0 Oct 27 04:45 UPGRADE
[a2z@edge adserver]$ ls -la /home/a2z/public_html/adserver
total 192
drwxr-xr-x  9 a2z a2z  4096 Oct 28 16:22 .
drwxr-xr-x  7 a2z a2z   130 Oct 27 04:55 ..
-rwxr-x---  1 a2z a2z   598 Oct 27 04:45 adclick.php
-rwxr-x---  1 a2z a2z   599 Oct 27 04:45 adframe.php
-rwxr-x---  1 a2z a2z   598 Oct 27 04:45 adimage.php
-rwxr-x---  1 a2z a2z   599 Oct 27 04:45 adjs.php
-rwxr-x---  1 a2z a2z   598 Oct 27 04:45 adlayer.php
-rwxr-x---  1 a2z a2z   599 Oct 27 04:45 adpopup.php
-rwxr-x---  1 a2z a2z   599 Oct 27 04:45 adview.php
-rwxr-xr--  1 a2z a2z     0 Oct 27 04:45 adx.js
-rwxr-x---  1 a2z a2z   600 Oct 27 04:45 adxmlrpc.php
-rwxr-xr--  1 a2z a2z  1447 Oct 27 04:45 composer.json
-rwxr-xr--  1 a2z a2z 24762 Oct 27 04:45 composer.lock
-rwxr-x---  1 a2z a2z 11607 Oct 27 04:45 constants.php
-rwxr-xr--  1 a2z a2z  1828 Oct 27 04:45 COPYRIGHT.txt
-rwxr-xr--  1 a2z a2z   215 Oct 27 04:45 crossdomain.xml
drwxr-xr-x  6 a2z a2z  4096 Oct 27 04:45 etc
-rwxr-x---  1 a2z a2z  1062 Oct 27 04:45 index.php
-rw-rw-r--  1 a2z a2z    20 Oct 28 16:22 info.php
-rwxr-x---  1 a2z a2z  4657 Oct 27 04:45 init-delivery-parse.php
-rwxr-x---  1 a2z a2z  2975 Oct 27 04:45 init-delivery.php
-rwxr-x---  1 a2z a2z  8004 Oct 27 04:45 init-parse.php
-rwxr-x---  1 a2z a2z  6076 Oct 27 04:45 init.php
drwxr-xr-x 22 a2z a2z  4096 Oct 27 04:45 lib
-rwxr-xr--  1 a2z a2z 15236 Oct 27 04:45 LICENSE.txt
drwxr-xr-x  2 a2z a2z    64 Oct 27 04:45 maintenance
-rwxr-x---  1 a2z a2z  3896 Oct 27 04:45 memory.php
-rwxr-x---  1 a2z a2z  1775 Oct 27 04:45 phpadsnew.inc.php
drwxr-xr-x  2 a2z a2z    23 Oct 27 04:45 plugins
-rwxr-x---  1 a2z a2z 11081 Oct 27 04:45 pre-check.php
-rwxr-xr--  1 a2z a2z  2211 Oct 27 04:45 README.md
-rwxr-xr--  1 a2z a2z  6391 Oct 27 04:45 RELEASE_NOTES.txt
-rwxr-xr--  1 a2z a2z   384 Oct 27 04:45 robots.txt
drwxr-xr-x  3 a2z a2z    42 Oct 27 04:45 scripts
drwxrwxrwx  5 a2z a2z   153 Oct 27 05:18 var
-rwxr-x---  1 a2z a2z  6815 Oct 27 04:45 variables.php
drwxr-xr-x  6 a2z a2z   118 Oct 27 04:45 www
[a2z@edge adserver]$

That's a bit of a puzzler... it definitely appears that everything is readable and writable. And your PHP scripts are running in the correct mode.

I did some Googling and found similar questions in the revive-adserver Forums.

They unfortunately didn't all get resolutions to their issues, but some possible things did stick out.

One possibility was SELinux... is that running on your server there? As that could potentially cause some problems.

You can determine that with this command:

sestatus

[a2z@edge adserver]$ sestatus
SELinux status:                 disabled
[a2z@edge adserver]$

Okay, we can rule that out!

The only other idea I got from their Forums was that some said that one of the paths in the config pointed to a location that it couldn't write to. In their case it was the images path.

I unfortunately don't know what the name of the config file is, but do you see something that looks like a config file in the adserver installation? If so, do you see any paths, particularly the image path, that may point to a location that's not writable?

Feel free to post that config file here and we can take a look as well.

Hmm, that looks more like a file containing PHP code than a config file.

I see in "/home/a2z/public_html/adserver/var", that there's something named "a2z.blue.conf.php", are you able to edit that? I suspect that would be the config file.

Unable to edit that file using nano.

[a2z@edge adserver]$ file var/a2z.blue.conf.php
var/a2z.blue.conf.php: broken symbolic link to `/home/a2z/public_html/adserver/var/www.a2z.blue.conf.php'

[a2z@edge adserver]$ stat var/a2z.blue.conf.php
  File: ‘var/a2z.blue.conf.php’ -> ‘/home/a2z/public_html/adserver/var/www.a2z.blue.conf.php’
  Size: 56        Blocks: 0          IO Block: 4096   symbolic link
Device: fc01h/64513d Inode: 13375078    Links: 1
Access: (0777/lrwxrwxrwx)  Uid: ( 1007/     a2z)   Gid: ( 1007/     a2z)
Access: 2019-11-01 19:57:29.714448891 +0000
Modify: 2019-10-27 04:45:18.424110180 +0000
Change: 2019-10-27 04:45:18.424110180 +0000
Birth: -
[a2z@edge adserver]$