This month's Index
Subject: Permissions problem with mod_sftp
Permissions problem with mod_sftp
From: Will Cosgrove <will_at_panic.com>
Date: Fri, 25 May 2012 12:42:02 -0700
remoteHandle = libssh2_sftp_open(session, file, LIBSSH2_FXF_READ, 0);
The server wipes out the file permissions. I.e., sets them to 000. According to the docs, if the file exists on disk it should ignore the mode bits. But it seems not to be the case.
We've tracked it back to the server config setting IgnoreSFTPUploadPerms, if this is set to yes, everything is fine. This seems like an pretty obvious server-side issue; *however* it works correctly using openssh's sftp client.
Before I continue tracking this down, do you guys have any ideas what the differences would be between openssh's sftp implementation and libssh2 which would be causing this?