From 12667c70f6b1de793270b0f4172c0335dccad55a Mon Sep 17 00:00:00 2001 From: Michael Wyraz Date: Fri, 13 Mar 2020 21:17:21 +0100 Subject: [PATCH] Fix roundcube permissions, tail correct log --- webmails/roundcube/start.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/webmails/roundcube/start.py b/webmails/roundcube/start.py index ef913a2b..649f3324 100755 --- a/webmails/roundcube/start.py +++ b/webmails/roundcube/start.py @@ -35,10 +35,10 @@ else: conf.jinja("/php.ini", os.environ, "/usr/local/etc/php/conf.d/roundcube.ini") -# Fix some permissions +# Create dirs, setup permissions os.system("mkdir -p /data/gpg /var/www/html/logs") -os.system("touch /var/www/html/logs/errors") -os.system("chown -R www-data:www-data /data /var/www/html/logs") +os.system("touch /var/www/html/logs/errors.log") +os.system("chown -R www-data:www-data /var/www/html/logs") try: print("Initializing database") @@ -57,8 +57,11 @@ try: except subprocess.CalledProcessError as e: quit(1) +# Setup database permissions +os.system("chown -R www-data:www-data /data") + # Tail roundcube logs -subprocess.Popen(["tail","-f","-n","0","/var/www/html/logs/errors"]) +subprocess.Popen(["tail","-f","-n","0","/var/www/html/logs/errors.log"]) # Run apache os.execv("/usr/local/bin/apache2-foreground", ["apache2-foreground"])