Server could accept uid < ULONG_MAX. But client can only accept uid<LONG_MAX. There is a gap between client and server. Variable l is defiled as signed long. Is it possible to extend? sftp> chown 2147483648 execute.sh You must supply a numeric argument to the chown command. case I_CHOWN: case I_CHGRP: if ((optidx = parse_ch_flags(cmd, argv, argc, hflag)) == -1) return -1; /* Get numeric arg (mandatory) */ if (argc - optidx < 1) goto need_num_arg; errno = 0; l = strtol(argv[optidx], &cp2, base); if (cp2 == argv[optidx] || *cp2 != '\0' || ((l == LONG_MIN || l == LONG_MAX) && errno == ERANGE) || l < 0) { need_num_arg: error("You must supply a numeric argument " "to the %s command.", cmd); return -1; }
Created attachment 3447 [details] Use long long for chown uid This seems to fix it. On an i386 before: sftp> chown 2147483648 /tmp/t You must supply a numeric argument to the chown command. and after: sftp> chown 2147483648 /tmp/t Changing owner on /tmp/t sftp> exit
Patch applied and will be in the next major release. Thanks for the report.
close bugs that were resolved in OpenSSH 8.5 release cycle