From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2166 Path: news.gmane.org!not-for-mail From: Laurent Bercot Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: s6-log does not obey umask Date: Wed, 14 Nov 2012 03:29:02 +0100 Message-ID: <20121114022902.GA25513@skarnet.org> References: <20121113204647.GA22147@hape.internal> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1352863951 16981 80.91.229.3 (14 Nov 2012 03:32:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Nov 2012 03:32:31 +0000 (UTC) Cc: supervision@list.skarnet.org To: Vallo Kallaste Original-X-From: supervision-return-2400-gcsg-supervision=m.gmane.org@list.skarnet.org Wed Nov 14 04:32:39 2012 Return-path: Envelope-to: gcsg-supervision@plane.gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TYTiP-0005g9-Q8 for gcsg-supervision@plane.gmane.org; Wed, 14 Nov 2012 04:32:37 +0100 Original-Received: (qmail 31929 invoked by uid 76); 14 Nov 2012 02:29:02 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 31920 invoked by uid 1000); 14 Nov 2012 02:29:02 -0000 Mail-Followup-To: supervision@list.skarnet.org, kalts@estpak.ee Content-Disposition: inline In-Reply-To: <20121113204647.GA22147@hape.internal> User-Agent: Mutt/1.4i Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2166 Archived-At: > I am not sure if it is intended behaviour or not. > echo |/command/umask 0027 s6-log /some/dir will create lock and > state files with permissions 0640, but current with 0744. It is the > world-readable bit I am concerned with. It is intentional. When the current file is created, it actually respects the umask. When s6-log exits, it uses the fchmod() system call, which doesn't take the umask into account, to chmod the current file to 744, which is a marker that says "processed, safe file". There is no security problem : the /some/dir directory will have restricted, umask-following, rights, so the "current" file will be unreadable by others anyway. -- Laurent