From owner-freebsd-current@freebsd.org Mon Jun 29 19:18:18 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 86E93352C2F for ; Mon, 29 Jun 2020 19:18:18 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49wchn6dp8z4GRZ for ; Mon, 29 Jun 2020 19:18:17 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1593458296; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=iD304tpprtM/1lgYCj6deCKhNUMfMwqgoQi91WNOQunBm+gfImfs1OSOkPO8gNT03oMaOjpCom8p6 KILXPl3yF5rnKPLqA1P7F3bkGfHabhqhKux7va95wYFI0m9+c1m2kqp4tvyNUF2U0n4oH1Jw4tMczA A1p3GUCtM9dvbr1ozD4DFe1Z5Ggl/ISBgOpUisVJHRGYqKqxN/9zZF99764Iv7Gfvusmlk2jJQfACf o1gAfh/SGTSAINTuJR/R/NrWgQ+d2XPUzlHX8qkJTa6AlEb4y43buztonXeLORjHpTgxEcWrwCZ2QT zjnHpJxkI6+0f3/VZN9NVlUNeS4CH2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=XOaYVOJlRbOl5UZrDoiuWIU1AZyOJwDJ6K7DkfIQajA=; b=iOS9EYav/Id4IKzacoDJ5ngBLRnwHGUGc01JG3HGzIWN2/3A121mM8FAD1DqyQkZUp9Cg2OTrsTZJ loo+U2GiwBltXVaPcaiXcB1R58A85S1FByi9kx3I88PIMQN8ginLKKq6/MaXES8QihqF0evov+CHhN ZWojkZxH4w3qkAj+F36mXxsmIfloRuaydvkZiP6yUMg+qyuU3ca39iFIJnYYgSJO21huEKmwj0TTsq /DmKxr/39mG/bp++va3nIUoRdp4aSEEXPFhiqvjvMNXVnjW0gOCiwW49mIN/C3PcF7HCtmT8iepzUa Axc/cP5QVhFYUPNOFAnLxhbxMhenomw== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=XOaYVOJlRbOl5UZrDoiuWIU1AZyOJwDJ6K7DkfIQajA=; b=EI1dQQ5r/jXaie10iXI/KGiuyNMeGWMXYQTKAj5IgxqhzgY0vdFpfKK9DqA9c/l/sXGYnwRsrbxm4 obc+GtAn33DUINWlxIEKdC7SiE6WW3w4VfzaqraU0lZMkXLB34+vnll3Su2RtCWUsZPQNAuyP8v+PE s+msj9LzcJWSPRG+8lgN3wSb5s1PgCffYTvrS3K0W+Kt3fwlIwzVarDT4r1dEsXetk0GuBwvFA5baU uUi7w2j4IbjotfrVLQR6Utrx/AAXj11uIjdm8lGLJMXM0lKUii8c2wEs+Ba/J1gaZZXPMCpJtVhmvp EXAc1kX519RYWpQXrsrwaL/+90F0F+g== X-MHO-RoutePath: aGlwcGll X-MHO-User: 46c36b56-ba3d-11ea-b630-6b8aa7872eb8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 46c36b56-ba3d-11ea-b630-6b8aa7872eb8; Mon, 29 Jun 2020 19:18:15 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 05TJICVc085702; Mon, 29 Jun 2020 13:18:12 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <934817c6a90cecc186bf06d3eec1ccba50dd834a.camel@freebsd.org> Subject: Re: Undeletable files after kyua test runs From: Ian Lepore To: Gordon Bergling , "Rodney W. Grimes" Cc: Kevin Oberman , FreeBSD Current , david@catwhisker.org Date: Mon, 29 Jun 2020 13:18:12 -0600 In-Reply-To: <20200629190856.GA44618@lion.0xfce3.net> References: <20200629174212.GA80071@lion.0xfce3.net> <202006291858.05TIwlGL048486@gndrsh.dnsmgr.net> <20200629190856.GA44618@lion.0xfce3.net> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49wchn6dp8z4GRZ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US]; local_wl_from(0.00)[freebsd.org] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 19:18:18 -0000 On Mon, 2020-06-29 at 21:08 +0200, Gordon Bergling wrote: > On Mon, Jun 29, 2020 at 11:58:47AM -0700, Rodney W. Grimes wrote: > > > On Mon, Jun 29, 2020 at 10:32:38AM -0700, Kevin Oberman wrote: > > > > On Mon, Jun 29, 2020 at 10:26 AM Gordon Bergling < > > > > gbe@freebsd.org> wrote: > > > > > I recently stumbled across undeletable files that are > > > > > generated by kyua > > > > > test runs, > > > > > for example > > > > > > > > > > -rwxr-xr-x 1 root wheel 0 May 9 13:10 > > > > > /tmp/kyua.aB4q62/8676/work/fileforaudit > > > > > > > > > > I haven't yet identified the test that generate those files, > > > > > but it is > > > > > impossible > > > > > to delete them. I have clear_tmp_enable="YES" set in the > > > > > /etc/rc.conf, but > > > > > on every boot the system argues that these file aren't > > > > > deletable. > > > > > I tried to 'rm -rf' them by hand but, even this wasn't > > > > > possible. I have > > > > > looked for > > > > > any extend attributes, but I didn't find any. > > > > > > > > > > Has anyone an idea how this is possible and may how these > > > > > files can be > > > > > deleted? > > > > > > > > Have you done 'ls -o' to check for flags like schg? > > > > -- > > > > Kevin Oberman, Part time kid herder and retired Network > > > > Engineer > > > > E-mail: rkoberman@gmail.com > > > > PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683 > > > > > > Argh, I haven't thought about chflags for quite some time. The > > > chflags > > > bit was set and after an > > > > > > # find /tmp/ -type f -exec chflags -R 0 {} \; > > > > ^^Only files ^^ meaningless when chflags is > > given ONLY files > > > > You probably could of done: > > chflags -R 0 /tmp/ > > Okay, I am currently working on an update for clear_tmp_enable="YES" > to include > a check like this. I would think that an rc option like this should > delete > everything in /tmp. > I disagree. One of the few things those immutable flags are good for is protecting files from things like an rc script or other automation that deletes files. Those flags are typically set and maintained by users and admins, and automation should not change them in order to delete files. The real fix we need is for the kyua tests to properly clean up after themselves, including fixing the flags on temporary files created or used by the tests, and then deleting them. -- Ian > > > > I was able to finally delete them. > > > > > > Thanks for the fast respone, > > > > > > Gordon > > --Gordon > _______________________________________________ >