1
SFFサーバーでJSFファイルを取得しようとしています。私はKnpGaufretteBundleとphpseclib-sftpアダプターを使用します。SFTP with GaufretteとPhpseclibでファイルを読み取ることができません
私は実行中のSFTPサーバーを持っていますが、私はそれをfilezillaに接続し、ファイルを読んだり読んだりして、アクセス権の問題はないと思っています。
問題は、接続作業ですが、私は
$sftpService->getExec()->run("ls")
のファイルを一覧表示することができますしかし、私は
$sftpService->getSftp()->listDirectory(".")
と私はディレクトリを作成することができませんが、それを一覧表示することができない...と私ファイルを読み取ることができません。ここに私のテストコードは次のとおりです。
$sftpService = $this->getContainer()->get("phpseclib_sftp");
dump($sftpService->getExec()->run("ls")); //file "test.txt" exist
$sftp = $sftpService->getSftp();
dump($sftp->exists("test.txt")); //false
dump($sftp->read("test.txt")); //false
dump($sftp->mkdir("testMkdir")); //true
dump($sftpService->getExec()->run("ls")); //the new directory exist
dump($sftp->listDirectory("testMkdir")); //false
とベースフォルダのパーミッション:ここ
-rwxrwxrwx 1 sftp_user staff 11 6 oct 10:31 test.txt
drwxr-xr-x 2 sftp_user staff 68 6 oct 10:56 testMkdir
編集:私はでファイルを読むことができます