We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17802
    • 190 Posts
    I’ve got several MODx installs on different servers, but I’ve never run into this problem before... I can’t access the file manager. Instead of a nice little list of directories, I get this:
    Warning: dir(/www/htdocs/me/) [function.dir]: failed to open dir: Permission denied in /www/htdocs/me/manager/actions/files.dynamic.php on line 393
    
    Fatal error: Call to a member function read() on a non-object in /www/htdocs/me/manager/actions/files.dynamic.php on line 396

    The weird thing is: I can still add images to pages through the resource browser in TinyMCE, thought some images appear to have broken thumbnails (but the images themselves look fine in the webpage).
    I’ve checked the resource path in the configuration, but everything looks normal there. Any ideas, anyone? Please?

    Server info:
    Web Server:

    * PHP version 5.2.0 running mod_php5
    * Apache version: Apache/1.3.34 (Unix) FrontPage/5.0.2.2635 PHP/5.2.0 mod_ssl/2.8.25 OpenSSL/0.9.8a
    * OS: Unix

    Database:

    * MySQL version: 4.1.13
    * List of any tables over 1MB in size: none

    MODx:

    * Version: 0.9.6
    * Any changes you’ve made: none
    * Any snippets you’re running on the page that is not working properly: not applicable
    * Any plugins you’re running: just the ones that come pre-installed

    Browser/Client:

    * Browser name and version: all of them
    * Operating System and version: Win xp and Mac OS X
      Thanks for MODx - I love it!
      • 22303 MODX Staff
      • 10,725 Posts
      Possibly you have the file_manager_path set to the site root but haven’t enabled the setting to allow users to manage files in the root?
        • 17802
        • 190 Posts
        Thanks for answering but no, that’s not it. Allow root is set to "yes" and besides, administrators can’t use the file manager either...
          Thanks for MODx - I love it!
          • 22303 MODX Staff
          • 10,725 Posts
          It has to be file/directory permissions then; as the error says, Permission denied in /www/htdocs/me/manager/actions/files.dynamic.php on line 393 when trying to run dir(’/www/htdocs/me/’). This indicates that it can’t get permission to open that directory for reading. Perhaps it’s an issue of ownership or read permissions for the user executing the PHP process (depends on your server configuration, likely, nobody, www, apache, or similar).
            • 17802
            • 190 Posts
            Thanks for your reply! So it seems the file manager doesn’t have permission to open the root dir for reading? Hm, I’ll have to discuss that with my hosting provider, I guess. Though I don’t really understand how it’s possible that the TinyMCE image browser is still (more or less) working. Does that make sense?
              Thanks for MODx - I love it!
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              That’s because the RTE’s resource manager accesses the /assets/files and /assets/images (etc) folders, and those have the permissions set to world-readable and world-writable. The Manager file manager is trying to access your site root folder, and that doesn’t have permissions set. Maybe if you set the directory to /www/htdocs/me/assets/ it will let you in. You don’t need to be accessing the files in the root and the manager folder anyway.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 17802
                • 190 Posts
                Sottwell, you rule! grin
                That actually works. Thanks a lot!
                  Thanks for MODx - I love it!