Date: Sun, 21 Jan 2018 12:24:03 -0700 From: Ian Lepore <ian@freebsd.org> To: "O. Hartmann" <ohartmann@walstatt.org>, Gary Jennejohn <gljennjohn@gmail.com> Cc: FreeBSD CURRENT <freebsd-current@freebsd.org>, "N.J. Mann" <njm@njm.me.uk> Subject: Re: mounting UFS2 filesystem with access mode via fstab Message-ID: <1516562643.42536.96.camel@freebsd.org> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2018-01-21 at 20:00 +0100, O. Hartmann wrote: > Am Sun, 21 Jan 2018 18:15:11 +0100 > Gary Jennejohn <gljennjohn@gmail.com> schrieb: > > > > > On Sun, 21 Jan 2018 11:37:16 +0100 > > "O. Hartmann" <ohartmann@walstatt.org> 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 <whatever> /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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1516562643.42536.96.camel>