mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-28 12:10:59 +00:00
SFTP: looks like some SFTP servers will fail unless write flag is also enabled
This commit is contained in:
parent
b4ebc5b931
commit
8aada4b30d
@ -1059,7 +1059,7 @@ class Net_SFTP extends Net_SSH2 {
|
||||
$atime = $time;
|
||||
}
|
||||
|
||||
$flags = NET_SFTP_OPEN_CREATE | NET_SFTP_OPEN_EXCL;
|
||||
$flags = NET_SFTP_OPEN_WRITE | NET_SFTP_OPEN_CREATE | NET_SFTP_OPEN_EXCL;
|
||||
$attr = pack('N3', NET_SFTP_ATTR_ACCESSTIME, $time, $atime);
|
||||
$packet = pack('Na*Na*', strlen($filename), $filename, $flags, $attr);
|
||||
if (!$this->_send_sftp_packet(NET_SFTP_OPEN, $packet)) {
|
||||
|
Loading…
Reference in New Issue
Block a user