annoying WP_filesystem limitations
-
from wp-admin/includes/file.php:
/** * {@internal Missing Short Description}} * * @since unknown * * @param unknown_type $args * @return unknown */ function get_filesystem_method($args = array()) { $method = false; if( function_exists('getmyuid') && function_exists('fileowner') ){ $temp_file = wp_tempnam(); if ( getmyuid() == fileowner($temp_file) ) $method = 'direct'; unlink($temp_file); } if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh2') ) $method = 'ssh2'; if ( ! $method && extension_loaded('ftp') ) $method = 'ftpext'; if ( ! $method && ( extension_loaded('sockets') || function_exists('fsockopen') ) ) $method = 'ftpsockets'; //Sockets: Socket extension; PHP Mode: FSockopen / fwrite / fread return apply_filters('filesystem_method', $method); }
what if you’re on a shared host that has the ssh2 extension enabled but don’t have an ssh account, yourself? shouldn’t wordpress let you chose which method you want to use?
also, on my employers hosting machine, ssh2/sftp is the only means by which a server can be accessed. no ftp server is installed and the scripts are run as nobody whereas they’re owner is the owner of the sftp account. it’d be nice if, as such, a pure-php implementation of sftp could be used. kind-of like how wordpress provides a pure-php implementation of ftp.
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘annoying WP_filesystem limitations’ is closed to new replies.