Permission denied - opendir

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • Permission denied - opendir

    Hallo ihrs,

    also ich schreibe gerade einen kleinen Datei uploader.
    Bzw. das ist das Ziel ;) Gerade bin ich noch beim Auflisten der Dateien... und schon hier stoß ich auf die ersten Rechte probleme..

    Schnippsel:

    Quellcode

    1. function getFileListAsTableContent() {
    2. $fileList="";
    3. $handle = opendir(ROOTDIRECTORY);
    4. while ($file = readdir($handle)) {
    5. if($file != "." && $file != "..") {
    6. $fileList.="<tr>";
    7. if(!is_dir(ROOTDIRECTORY."/".$file)) {
    8. //complete path
    9. $compl = ROOTDIRECTORY."/".$file;
    10. $fileList.="<td> <a href=\"".$compl."\">".$file."</a> </td>
    11. <td>".getChangeTime()."</td>
    12. <td> Löschen...</td>";
    13. }
    14. $fileList.="</tr>";
    15. }
    16. }
    17. closedir($handle);
    18. echo $fileList;
    19. }
    Alles anzeigen


    So, wenn ich versuche den ganzen kram auszuführen erhalte ich:

    Quellcode

    1. Warning: opendir() [function.opendir]: open_basedir restriction in effect. File(//sources) is not within the allowed path(s): (/var/www/web100524/html/:/var/www/web100524/phptmp/:/var/www/web100524/files/:/var/www/web100524/atd/:/usr/bin/) in /var/www/web100524/html/upload/includes/fileList.php on line 10
    2. Warning: opendir(/sources) [function.opendir]: failed to open dir: Operation not permitted in /var/www/web100524/html/upload/includes/fileList.php on line 10
    3. Warning: readdir(): supplied argument is not a valid Directory resource in /var/www/web100524/html/upload/includes/fileList.php on line 11
    4. Warning: closedir(): supplied argument is not a valid Directory resource in /var/www/web100524/html/upload/includes/fileList.php on line 26


    Okay, eindeutig Rechteproblem.. gut also einfach m al Testweise Dateirechte ändern..
    Wenn ich einfach allem jedem jedem 777 gebe (ich weiß, ein no-go aber testzwecke ;) ) erhalte ich einen anderen Error (vermutlich schutz vom Provider oder so):

    Quellcode

    1. Internal Server Error
    2. The server encountered an internal error or misconfiguration and was unable to complete your request.
    3. Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    4. More information about this error may be available in the server error log.


    Hmmm.. X(
    Wie kann ich nun die Dateieien auflisten lassen?^^ Bzw. wie werde ich diese ganzen Warnings los?

    Danke euch!