Support » How-To and Troubleshooting » Have WordPress recognize filesystem ACLs

Have WordPress recognize filesystem ACLs

  • Hi everyone,

    Does anyone know of a way to modify WordPress so that it recognizes filesystem ACLs and/or have it use SFTP over FTP?

    I currently run multiple sites in chrooted home directories and use a system instance of Apache to manage the whole deal (which is what I want). I use filesystem ACLs to give apache Read, Write and Execute permissions over the www folder inside the account (again: what I want). That said, the folder is owned by the user.

    So… any ideas how to have WordPress recognize those filesystem ACLs I have set up OR know how to get WordPress to recognize SFTP?

Viewing 2 replies - 1 through 2 (of 2 total)
  • I think SFTP would probably require that the SSH2 extension for PHP be installed and working.

    Well, I have SFTP up and running (thanks ClaytonJames!), but there are issues there as well (stops updating or at least takes forever…). I see files in the wp-content/upgrades folder, so I know it’s initiating correctly, but I get stream errors in the web log no matter if I’m updating a plugin or the core:
    PHP Warning: stream_get_contents(): Failure 'would block' (-9) in /home/username/www/wp-admin/includes/class-wp-filesystem-ssh2.php on line 142

    I found this code snippet in the referenced file (I put a comment next to line 142):

    function run_command( $command, $returnbool = false) {
                    if ( ! $this->link )
                            return false;
                    if ( ! ($stream = ssh2_exec($this->link, $command)) ) {
                            $this->errors->add('command', sprintf(__('Unable to perform command: %s'), $command));
                    } else {
                            stream_set_blocking( $stream, true );
                            stream_set_timeout( $stream, FS_TIMEOUT );
                            $data = stream_get_contents( $stream ); //This is line 142
                            fclose( $stream );
                            if ( $returnbool )
                                    return ( $data === false ) ? false : '' != trim($data);
                                    return $data;
                    return false;

    I have no idea what the issue is.

    So… is it easier to resolve the filesystem ACLs item or dig into this sucker?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Have WordPress recognize filesystem ACLs’ is closed to new replies.