Logrotate can't access roundcube/phpmyadmin logs

It looks different now over here this is the content currently:

Code:
/var/www/html/roundcube/logs/errors /var/www/html/squirrelmail/data/squirrelmail_access_log /var/www/html/phpMyAdmin/log/auth.log {
        missingok
}
 
Add the change to the file, eg:
Code:
/var/www/html/roundcube/logs/errors /var/www/html/squirrelmail/data/squirrelmail_access_log /var/www/html/phpMyAdmin/log/auth.log {
        missingok
        su webapps webapps
}
John
 
Just fixed an issue on CentOS 7 with the help of John's solution:

Code:
error: skipping "/var/www/html/squirrelmail/data/squirrelmail_access_log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
[root@server]#
[root@server]# ls -ld /var/www/html/squirrelmail/data/
drwxrwx--- 2 webapps webapps 4096 May  7 02:00 /var/www/html/squirrelmail/data/
[root@server]#

That's working.

p.s. A post for a history ;)
 
Hello,

I have same problem same files the fix here is applied.
error: stat of /var/www/html/roundcube/logs/errors failed: Permission denied
error: stat of /var/www/html/roundcube/logs/sendmail failed: Permission denied
error: stat of /var/www/html/squirrelmail/data/squirrelmail_access_log failed: Permission denied
error: stat of /var/www/html/phpMyAdmin/log/auth.log failed: Permission denied

I know exactly what is causing this (i have messed with owners and rights)
So wil apply zEitEr fix the reason i am posting a update here is since this post is what comes up when searching the error.

This happend afther i ran file permissions reset script from DA (./set_permissions.sh all)
So just wondering if this to be expected, If there is a error/bug in the script ? or dit i fubared running a simple script ?

Update this was also causing this: https://forum.directadmin.com/threa...phpmyadmin-and-squirrelmail-for-a-user.48460/ (both solutions applied and it looks fixed.)

If wanted i can update the script above and send modified to DA support.
 
Last edited:
And what do you have in /etc/logrotate.d/webapps ? Does it look the same as post #22 ?
I have restored the settings ATM thanks to all suggestions here.

My point was that the script does not repair all of the file rights.
IMHO it should be updated or changed. Unless I miss understand its function ?
 
If you mean ./set_permissions.sh then yes, it might miss some important files, and you are free to report you improvement to DirectAdmin developers.

If you mean /etc/logrotate.d/webapps then it's not intended to fix permissions at all.
 
If you mean ./set_permissions.sh then yes, it might miss some important files, and you are free to report you improvement to DirectAdmin developers.
Yep indeed its not repairing /var/www/html

If you mean /etc/logrotate.d/webapps then it's not intended to fix permissions at all.
Fair ! thought it was system wide but then ignore what i said cause i changed those settings in the first place:

I had run chown -r user:user several times to test somethings should have made a backup before.
Just to clarify i have no current issue just wished to to give feedback on the ./set_permissions.sh script not updating the /var/www/html apps settings
 
Back
Top