From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1680076812; bh=Y5kyznoyB13yVBMWb8In18I3c9XVebiYvdY7rOuc3SU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UQXsMAqYiFNWuvTdu1Rix8X0bpO8Js9FZMwtP+EdPpkMTwIdpWc/cA0s1g0JiIaYq IoI7pZG3U51oiRXWmV4cce9u/WRD3XU0zFHjvSfxf/JB1HvDOlcPbcanMYh/Xee/Ou Q1XoHMDnyHXfsV8gEp052GNCWpBTGAhU2z3XJ0HdvBDcXOld3ib+IcsHqNqcx2Mv8A bhOaWJvo74B8uZ7uYWKNVB5kqlxdGMvyiJpCwrEQVISqQ6lt3Wd08mYWMW1iTODl/t 2g4XWUDs51XZ/MLgNZa/n+1vsJXY4ydn28946zft4yXlKXJ9z+jlXCE3zmivk/J2j6 RIT8HdB7An4mg== Received: from localhost.localdomain (unknown [182.253.88.211]) by gnuweeb.org (Postfix) with ESMTPSA id DBFFD2407D6; Wed, 29 Mar 2023 08:00:08 +0000 (UTC) From: Ammar Faizi To: GNU/Weeb Mailing List Cc: Muhamad Hazmi Alfarizqi , Muhamad Hazmi Alfarizqi , Alviro Iskandar Setiawan , Arthur Lapz , Ammar Faizi Subject: [PATCH a001 v1 7/7] docker-entrypoint: Properly set directory ownership and mode Date: Wed, 29 Mar 2023 14:59:32 +0700 Message-Id: <20230329075932.492885-8-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230329075932.492885-1-ammarfaizi2@gnuweeb.org> References: <20230329075932.492885-1-ammarfaizi2@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: When the container is restarted, the ownership and mode of the mounted directories might have changed. Ensure we correct them properly at initialization. While in there, also change "service rsyslog start" with directly invoke "/usr/sbin/rsyslogd". Using Ubuntu 22.04 can't start it using service: # service rsyslog start rsyslog: unrecognized service Signed-off-by: Ammar Faizi --- docker-entrypoint.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index d741061731ecc64f..963e249bc601102b 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -2,11 +2,20 @@ chown -v root:root /var/keys -service rsyslog start +chown -R opendkim:opendkim /var/keys/dkim +chmod -R 700 /var/keys/dkim + +chown -R vmail:vmail /var/vmail +chmod -R u+rw,g+rw,o= /var/vmail + +chown -R mysql:mysql /var/lib/mysql +chmod -R u+rw,g+rw,o= /var/lib/mysql + +/usr/sbin/rsyslogd + service ssh start -service nginx start service mysql start - +service nginx start service postfix start service dovecot start service opendkim start -- Ammar Faizi