0
$connection=ssh2_connect('Ip address', 22);
ssh2_auth_password($connection, 'username','password')
$sourceFilePath = 'some remote file path';
$destinationFilePath = '/var/cliscripts/sample.txt';
$fileTransferStatus = ssh2_scp_recv($connection, $sourceFilePath, $destinationFilePath);
上面下面的代码是复制远程文件到本地目录,但本地目录下的文件无法打开错误出现:ssh2_scp_recv(remote_file,LOCALFILE):未能打开流:权限被拒绝
Permission denied, Unable to write to local file
远程文件无法复制到本地目录,权限被拒绝error.Please帮我关于THI秒。 – user3165241
apache用户是否已经读取目标文件夹的\写权限? –
-rw-r - r-- 1根root 35519227 Jan 23 00:09 admin_oai_noreg_tomagent.log – user3165241