From 60d8c84e0887514c99c9ce071965fafaa1c3d34a Mon Sep 17 00:00:00 2001 From: "djm@openbsd.org" Date: Wed, 16 Jan 2019 23:23:45 +0000 Subject: upstream: Add "-h" flag to sftp chown/chgrp/chmod commands to request they do not follow symlinks. Requires recently-committed lsetstat@openssh.com extension on the server side. ok markus@ dtucker@ OpenBSD-Commit-ID: f93bb3f6f7eb2fb7ef1e59126e72714f1626d604 --- sftp.1 | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'sftp.1') diff --git a/sftp.1 b/sftp.1 index 7140bc19b..722a34419 100644 --- a/sftp.1 +++ b/sftp.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sftp.1,v 1.122 2018/11/16 02:30:20 djm Exp $ +.\" $OpenBSD: sftp.1,v 1.123 2019/01/16 23:23:45 djm Exp $ .\" .\" Copyright (c) 2001 Damien Miller. All rights reserved. .\" @@ -22,7 +22,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: November 16 2018 $ +.Dd $Mdocdate: January 16 2019 $ .Dt SFTP 1 .Os .Sh NAME @@ -316,31 +316,52 @@ Change remote directory to If .Ar path is not specified, then change directory to the one the session started in. -.It Ic chgrp Ar grp Ar path +.It Xo Ic chgrp +.Op Fl h +.Ar grp +.Ar path +.Xc Change group of file .Ar path to .Ar grp . +If the +.Fl h +flag is specified, then symlinks will not be followed. .Ar path may contain .Xr glob 7 characters and may match multiple files. .Ar grp must be a numeric GID. -.It Ic chmod Ar mode Ar path +.It Xo Ic chmod +.Op Fl h +.Ar mode +.Ar path +.Xc Change permissions of file .Ar path to .Ar mode . +If the +.Fl h +flag is specified, then symlinks will not be followed. .Ar path may contain .Xr glob 7 characters and may match multiple files. -.It Ic chown Ar own Ar path +.It Xo Ic chown +.Op Fl h +.Ar own +.Ar path +.Xc Change owner of file .Ar path to .Ar own . +If the +.Fl h +flag is specified, then symlinks will not be followed. .Ar path may contain .Xr glob 7 -- cgit v1.2.3