Building RPM for Openssh5.6p1 fails on RHEL 6.0

Rob C candland at
Thu Dec 16 07:52:04 EST 2010

On Thu, Dec 16, 2010 at 01:43:25AM +1100, mark jones wrote:
> All,
>   I am trying to build openssh-5.6p1 using the SPEC file on RHEL 6 and I am
> receiving this
> error:
> [root@**** SPECS]# rpmbuild -bb openssh.spec
> error: line 47: Unknown tag: Copyright          : BSD
> Also,
>   I read that the umask functionality in this one has issues.  Does it
> work in the 5.5 source?
> Any help would be appreciated.

The umask functionality in sftp-server.c ver 5.5 will not work as
expected due to the -u argument being parsed as decimal.  The fix (which
will likely be in the next version) uses:
mask = strtol(optarg, &cp, 8);

where the 5.5 and 5.6 (and earlier) code incorrectly uses:
mask = (mode_t)strtonum(optarg, 0, 0777, &errmsg);

However, due to the "put -p" option in the sftp client, the sftp-server
has to honor permissions (within reason) sent from the client. This is a
nice feature if your users want to control permissions on files they

For me, it's not so great as I want to control permissions of a file
received via sftp-server and the umask option does not provide
sufficient fine-grained control of file permissions.  (Understandably

The bottom line is that the fixed "-u <umask>" will do exactly what it
is supposed to do - masks permission bits, you just can't count on what
bits it will mask.

End thread drift, hope this helps,

-Rob Candland

More information about the openssh-unix-dev mailing list