From patchwork Sat Mar 16 23:04:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 2154 Return-Path: Received: from mail01.ipfire.org (mail01.i.ipfire.org [172.28.1.200]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail01.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web07.i.ipfire.org (Postfix) with ESMTPS id D76ED88A13D for ; Sat, 16 Mar 2019 12:04:24 +0000 (GMT) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 44M1MW72rYz50w44; Sat, 16 Mar 2019 12:04:23 +0000 (GMT) Received: from tuxedo.stevee (unknown [46.125.249.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 44M1MS6WdFz50w3y; Sat, 16 Mar 2019 12:04:20 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1552737861; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=8daDtWMYhe7LjmmNV05XTwcOLWDzYZoW84Mb11QxbWA=; b=XPsqRFuKObFS9dJOuNyEPy/65yU2NawjrTBfYVhzRUQZ9puY/HpO5HsX/ZCYOIWaCb1rXY XIwn35wBvYhaLWNQEWcq4tWTuz3UDTKAVwrzT39I/eu+Xvnl+zUH18bgc/IVnNnE1G/V9k jfkGMw+xXXj1DHOfKXoF1ISV3Sb5pS8HJgKMVrzBiDIiYmxpFLlU2SJF5gEWo8F3U4DVdt hyCPy6xwBHilceCEEZwUcyCfFmQa47SEqfHFscOpA0Hw9tJyetv3UIfIylz2yOYKGJDDAA /gVCKrdh4Fz76LwNpoECV2Q1uoX8DUpS0jawjhU40lLUl8KFSKvWJhUTsEw9Iw== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] suricata: Fix ownership and file permissions of files inside /var/lib/suricata. Date: Sat, 16 Mar 2019 13:04:18 +0100 Message-Id: <20190316120418.5765-1-stefan.schantl@ipfire.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Spamd-Result: default: False [4.88 / 11.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_MISSING_CHARSET(2.50)[]; BROKEN_CONTENT_TYPE(1.50)[]; DKIM_SIGNED(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:~]; ASN(0.00)[asn:8412, ipnet:46.124.0.0/15, country:AT]; BAYES_HAM(-0.12)[66.71%] Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=stevee smtp.mailfrom=stefan.schantl@ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" These files needs to have nobody.nobody as owner but requires read-acces from everyone to allow the suricata user reading-in this files during startup. Signed-off-by: Stefan Schantl --- lfs/suricata | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lfs/suricata b/lfs/suricata index 0a561ef8b..d7b5b71d6 100644 --- a/lfs/suricata +++ b/lfs/suricata @@ -101,8 +101,12 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) # to the rules directory. mv /etc/suricata/*.config /var/lib/suricata - # Set correct ownership for /var/lib/suricata - chown nobody:nobody /var/lib/suricata + # Set correct permissions for the files. + chmod 644 /var/lib/suricata/*.config + + # Set correct ownership for /var/lib/suricata and the + # contained files + chown -R nobody:nobody /var/lib/suricata # Create logging directory. -mkdir -p /var/log/suricata