Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 May 2020 01:07:08 +0000
From:      bugzilla-noreply@freebsd.org
To:        doc@FreeBSD.org
Subject:   [Bug 246760] ZFS usermount sysrc command invalid
Message-ID:  <bug-246760-9@https.bugs.freebsd.org/bugzilla/>

index | next in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246760

            Bug ID: 246760
           Summary: ZFS usermount sysrc command invalid
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Documentation
          Assignee: doc@FreeBSD.org
          Reporter: mikeplemmons@gmail.com

On https://www.freebsd.org/doc/handbook/zfs-zfs.html under heading 19.4.7.2.
Sending Encrypted Backups over SSH the text says the following.

"To mount the pool, the unprivileged user must own the directory, and regular
users must be allowed to mount file systems. On the receiving system:

# sysctl vfs.usermount=1
vfs.usermount: 0 -> 1
# sysrc -f /etc/sysctl.conf vfs.usermount=1
# zfs create recvpool/backup
# zfs allow -u someuser create,mount,receive recvpool/backup
# chown someuser /recvpool/backup"

When I type the following as using sudo on my 12.1-RELEASE-p2 system I get an
error.

[mike@nas ~]$ sudo sysrc -f /etc/sysctl.conf vfs.usermount=1
sysrc: vfs.usermount: name contains characters not allowed in shell

When I change to the root user I get the same error.

[mike@nas ~]$ sudo -i
root@nas:~ # sysrc -f /etc/sysctl.conf vfs.usermount=1
sysrc: vfs.usermount: name contains characters not allowed in shell


It seems like the valid characters variable in /usr/share/bsdconfig/sysrc.subr 
is incorrect.

VALID_VARNAME_CHARS="0-9ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_"

Should it include a period?

Also, I believe the documentation should clarify when a user needs to run as
root versus when to run as a non-root user. At least it seems like every
command should be run as root but it is not clear.

I had to manually edit the /etc/sysctl.conf file.

-- 
You are receiving this mail because:
You are the assignee for the bug.

help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-246760-9>