Bug 227406

Summary: man zfs need correcting on import to FreeBSD, as some behaviours differ from its source OS
Product: Documentation Reporter: Stilez <stilezy>
Component: Manual PagesAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Some People CC: doc, pauamma, pstef
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Stilez 2018-04-10 03:50:01 UTC
The zfs man page has been imported from its source unix (illumos/openzfs/solaris/classical unix of some kind) without correcting for discrepancies between the source OS described and FreeBSD. It therefore misleads about the scope of the setuid flag on FreeBSD.

"man zfs" -> "setuid=on" property states that this property "controls whether the set-UID bit is respected for the file system". There are no stated qualifiers/limitations. 

On a classical unix this may be a correct description but on FreeBSD the setuid bit acts on files **and dirs** "if the file system supports it", which "man zfs" implies it does (ref: man chmod).

So a plain reading of man zfs is that setting this property will affect files and dirs. This is not correct *for FreeBSD* even if common on other UNIXes.


Correction required:

"setuid = on | off : Controls whether the set-UID bit is respected for **files on** the file system. **The property has no effect on directories on the file system**.  The default value is on."


Current wording (incorrect):

"setuid = on | off : Controls whether the set-UID bit is respected for the file system. The default value is on."


Issue identified via FreeBSD-fs mailing list discussion.
Comment 1 Stilez 2018-04-10 04:15:38 UTC
clarification to OP, 3rd para, "the setuid bit acts on files and dirs if the file system supports it" is referencing the chmod 4000 bit, not the zfs property of the same name. The issue is that zfs only supports it partially (files but not dirs) but its man page doesn't say so.
Comment 2 Piotr Pawel Stefaniak freebsd_committer 2022-04-21 20:31:00 UTC
This bug lives in zfsprops.7 now.
Comment 3 PauAmma freebsd_triage 2022-04-23 02:36:31 UTC
(In reply to Piotr Pawel Stefaniak from comment #2)

On 13 and 14-current, maybe. On 12 it's still in zfs(8).