Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> ftp_get/Permission denied, mimo chmod 777
devuriel
post
Post #1





Grupa: Zarejestrowani
Postów: 16
Pomógł: 0
Dołączył: 29.05.2009

Ostrzeżenie: (0%)
-----


Kod
Warning: ftp_get(bg.jpg) [function.ftp-get]: failed to open stream: Permission denied in /var/www/xx/file_fget.php on line 24


chmod'y dla plików, A NAWET dla *.php (IMG:http://forum.php.pl/style_emoticons/default/aaevil.gif) na 777..(IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

Przyznam, że skrypt się sypie w momencie kiedy jest na docelowym serwerze z Linuxem(FTP). Na Windowsie wszystko było/jest OK.

  1. <?php
  2. if ($this->handleCh=ftp_chdir($this->conn, $_SESSION['dir']) && $this->ftpGet=ftp_get($this->conn, $fileName, $fileName, FTP_BINARY))   <-- B&#322;ąd
  3.    {
  4.        header('Content-Length: '.filesize($fileName));
  5.        header('Content-Type: application/octet-stream');
  6.        header('Content-Disposition: attachment; filename="'.basename($fileName).'"');
  7.        header('Content-Transfer-Encoding: binary');
  8.        header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
  9.        readfile($fileName);
  10.        exit;
  11.    }
  12. ?>


Ten post edytował devuriel 21.07.2009, 10:17:38
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 16.09.2025 - 17:40