> When my users (including me) try to sftp using the Win-2.2.0.exe
> program to a 2.2.0 server, the file that they upload gets the error
> below.   The file is also given root:root ownership and perms 0000.

This is outrageous! Following is (relevant) output from 'truss -p
<sftp-server-pid>' on Solaris box:

unlink("/my/dir/a.txt")                         = 0
open("/my/dir/a.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
fchmod(3, 0)                                    = 0
fchown(3, 0, 0)                                 Err#1 EPERM
fchmod(3, 0100666)                              = 0
utime("/my/dir/a.txt", 0xEFFFF94C)              = 0
fchmod(3, 0100666)                              = 0
utime("/my/dir/a.txt", 0xEFFFF94C)              = 0
close(3)                                        = 0

Well, if Solaris whould let 'fchown(3,0,0)' through then I would also
get root:root and 0000 perms and the error message... Sometimes I really
wonder how do they think... To blindly beleive what a windows box say...
How does uid-gid calculated? How does 666 get calculated? I mean in
fchmod...

It should be noted however that if you switch off "preserve original
file time" in "file transfer" preferences it looks much better:

unlink("/my/dir/a.txt")                         = 0
open("/my/dir/a.txt", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
fchmod(3, 0)                                    = 0
fchmod(3, 0100644)                              = 0
close(3)                                        = 0

> The file appears to have transferred completely intact.
> 
> sftp on the 2.2.0 server in a loop back seems to work just fine.

Presumably because sftp never does "preserve original file time" or
transfer meaningful information to sftp-server...

> 
> sftp to 2.0.13 seems to be OK too.

2.1.0 (server) is flawed.

> 
> ******
> 
> error output from Win sftp app.
> 
> file(s); permissions acmodtime
> Transfer failed with error 7: /home/calvin/check.c: No privileges to
> change attributes on destination file. (this probably isn't anything,
> as non-roots rarely can re-set files owner)
> DONE - 1 Files 2,892 Total
> Encountered 2 errors.
> 
> Any ideas or suggestions?

As temporary workaround advice to switch off "preserve original file
time" in "file transfer" preferences. I wish I could say "file a bug
report"... but I can't as SSH Communications "... regret that we are
unable to provide support from SSH Communications for either
Non-commercial licenses or for University users." Well, I myself survive
and might even share a patch (for the sftp-server naturally:-) with the
community...

Cheers. Andy.

Reply via email to