From owner-freebsd-current@freebsd.org Sun Jan 21 19:25:13 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65743EB618E for ; Sun, 21 Jan 2018 19:25:13 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47937788E3 for ; Sun, 21 Jan 2018 19:25:12 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 879995cd-fee0-11e7-93a5-cd02e7dc7692 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 879995cd-fee0-11e7-93a5-cd02e7dc7692; Sun, 21 Jan 2018 19:23:16 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w0LJO38U001720; Sun, 21 Jan 2018 12:24:03 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1516562643.42536.96.camel@freebsd.org> Subject: Re: mounting UFS2 filesystem with access mode via fstab From: Ian Lepore To: "O. Hartmann" , Gary Jennejohn Cc: FreeBSD CURRENT , "N.J. Mann" Date: Sun, 21 Jan 2018 12:24:03 -0700 In-Reply-To: <20180121200036.4982e096@thor.intern.walstatt.dynvpn.de> References: <20180121113743.1e6bf774@thor.intern.walstatt.dynvpn.de> <20180121181511.0e1c02d4@ernst.home> <20180121200036.4982e096@thor.intern.walstatt.dynvpn.de> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 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: Sun, 21 Jan 2018 19:25:13 -0000 On Sun, 2018-01-21 at 20:00 +0100, O. Hartmann wrote: > Am Sun, 21 Jan 2018 18:15:11 +0100 > Gary Jennejohn schrieb: > > > > > On Sun, 21 Jan 2018 11:37:16 +0100 > > "O. Hartmann" wrote: > > > > > > > > Recently, I ran into the problem mounting a newly created /tmp, > > > when I switched back > > > from a tmpfs-backed /tmp to a UFS2/SSD/HDD backed /tmp.  > > > > > > The convenience to set mode=01777 for the memory/tmpfs backed > > > /tmp seems not to exist > > > for UFS2 backed filesystems, since manpage mount(8) doesn't give > > > me any option > > > provided via -o which could accomplish what I can achieve with > > > mode=, see man > > > tmpfs(5). > > > > > > Well, I guess I do miss something here or is this achievement > > > reached on a different > > > path I'm unaware of? > > >    > > chmod 1777 /tmp as root > > > Well, > that is the way we do it usually. But is there now way to perform the > settings via fstab > entry? Look at man  tmpfs, man mount_msdosfs, for instance, they > provide options which > can be put into the option column of fstab. > You don't need to do it via the fstab, because the permissions are persistent in the filesystem.  Just mount the filesystem on /tmp by hand, then chmod /tmp after mounting it and then it will always have those permissions (wherever it is mounted). With tmpfs there is no persistent storage to keep the permissions, so there must be a way to set it from fstab.  With msdosfs there is no way to store the unix-style permissions in the fs, so there must be a way to set it from fstab.  For UFS, the mode is just stored in the fs. -- Ian