Menu

#32 Media scanner does not skip Permission Denied errors

v1.0-beta4
open
nobody
General (7)
3
2007-09-20
2007-09-20
Quis
No

I have a few maps in my music dir without read/execute permissions for the web user.

I did this to prevent it being indexed (Contained some sample mp3-files of a DJ-program); when updating the media database it raises a warning about permission denied in opendir, and after that another warning of readdir, 'cause opendir failed :P

Discussion

  • Quis

    Quis - 2007-09-20
    • milestone: --> v1.0-beta4
    • priority: 5 --> 3
     
  • Quis

    Quis - 2007-09-20

    Logged In: YES
    user_id=1895263
    Originator: YES

    Fix:
    1. Open core/indexing/MediaDBMaintainer.php
    2. Search for opendir
    3. Add these lines before opendir:
    if(!is_dir($file) || !is_readable($file) || !is_executable($file))
    return FALSE;
    4. Repeat steps 2 and 3
    5. Repeat steps 2 upto 4 for core/indexing/MediaInfoCacheMaintainer.php

    And atleast indexing won't raise these errors

    Grep on opendir resulted:
    core/browser/SLDirExplorer.php: $handle=opendir($dir);
    core/indexing/MediaDBMaintainer.php: $dir = opendir( $file );
    core/indexing/MediaDBMaintainer.php: $dir = opendir( $file );
    core/indexing/MediaInfoCacheMaintainer.php: $dir = opendir( $file );
    core/indexing/MediaInfoCacheMaintainer.php: $dir = opendir( $file );
    core/playlist/SLPLDirAdder.php: $handle=opendir( $cur_path );
    core/theme/SLThemeManager.php: $handle=opendir( $this->path );
    core/M3UGenerator.php: $handle=opendir( $cur_path );

    Don't know whether all of them are bugging

     

Log in to post a comment.

MongoDB Logo MongoDB