Resource icon

AJAX File Manager for your Admin Control Panel (XF1) 1.0

No permission to download
Logging in is for ftp. This is AJAX.

Yeah, I could make a user/password form, but what would you submit to? You can't submit to a directory. Somewhere on the server Is some scripting for ftp and even if you logged in for that it wouldn't help with AJAX.

I don't know what you're using to edit upload, etc., but if you want an alternative you could look into EXTplorer, but it uses EditArea, which can be pretty slow.

Sorry I couldn't make this work for you
 
Logging in is for ftp. This is AJAX

Yeah, I could make a user/password form, but what would you submit to? .

A bit of research would probably tell you how to make it submit and to what. It just needs the ability to log into my webhosting account to gain access to that folder. Something similar to the below might work. It's for ftp, but if it allows the add-on to connect then it might work.

Code:
protected function _ftp_($engineOptions)

    {

        $config = Connect_Helper_StorageOptions::getFtpConfig($engineOptions);


        if (is_array(self::$_onHoldions)) {

            $onHoldKey = md5($config['host'] . $config['port'] . $config['username']);

            if (!empty(self::$_onHoldions[Connect_Option::MODE_FTP][$onHoldKey])) {

                return self::$_onHoldions[Connect_Option::MODE_FTP][$onHoldKey];

            }

        }


        if (!function_exists('ftp_')) {

            throw new XenForo_Exception('PHP does not have FTP support enabled');

        }


        if (empty($config['host'])) {

            throw new XenForo_Exception('FTP host cannot be empty');

        }


        $ion = @ftp_($config['host'], $config['port']);

        if (empty($ion)) {

            throw new XenForo_Exception(sprintf('Unable to  to %s:%d', $config['host'], $config['port']));

        }


        if (!empty($config['username']) && !empty($config['password'])) {

            $loggedIn = @ftp_login($ion, $config['username'], $config['password']);

            if (!$loggedIn) {

                throw new XenForo_Exception(sprintf(

                    'Unable to login to %s (user=%s)',

                    $config['host'],

                    $config['username']

                ));

            }

        }


        if ($config['passive']) {

            $passiveModeOk = @ftp_pasv($ion, true);

            if (!$passiveModeOk) {

                throw new XenForo_Exception(sprintf('Unable to switch to passive mode for %s', $config['host']));

            }

        }


        if (is_array(self::$_onHoldions)

            && !empty($onHoldKey)

        ) {

            self::$_onHoldions[Connect_Option::MODE_FTP][$onHoldKey] = $ion;

        }


        return $ion;

    }


    protected function _ftp_close($ion)

    {

        if (empty($ion)) {

            return true;

        }


        if (is_array(self::$_onHoldions)) {

            return true;

        }


        return @ftp_close($ion);

    }


    protected function _ftp_mkdirs($ion, $dirPath)

    {

        $parts = explode('/', $dirPath);

        $missingParts = array();

        $existingPath = false;

        while (!empty($parts)) {

            $checkingPath = implode('/', $parts);


            if (empty($checkingPath)) {

                $checkingPath = '/';

            }


            if (@ftp_chdir($ion, $checkingPath)) {

                $existingPath = $checkingPath;

                break;

            }
 
Well. I'm not going there; my next projects will be converting this and the template editor over to XF2. I've only begun learning how to do XF2 add-ons. Playing around with ftp is something I may take up much later.

But just one last thing: I'm not at all convinced this has anything to do with being logged in or any kind of permission; the error message says that directory does not exist, nothing about permissions, and a missing slash at the beginning of the path string fully accounts for that error message. I tried it on my site and got roughly the same error message. Why that's happening is a complete mystery to me; that last hack I had you try is what you would have to call a brute force hack and still something's going awry.
 
No, you have to be logged into your host account to gain access to that me folder. It would just need to connect first before anything else starts and then disconnect when you exit out of the file manager. Your add-on would still be AJAX, but using the ftp for the connection only, just to gain access to that folder.

Anyway, I'll keep checking back here from time to time, it's a cool add-on.
.
 
Last edited:
I get that when I open it.
download.webp
The forums I use are hosted on a dedicated windows host-machine.
Thanks, great piece of kit! :)
 
This product was designed and tested on a Linux server. I have no access to a Windows server and can't test it on one. If anyone wants to test this on a Windows server I would appreciate any feedback.

Sorry, I don't have any idea how this will work on Windows.
 
Top Bottom