• In,

    /woocommerce-pdf-invoices-packing-slips/vendor/phenx/php-font-lib/

    .htaccess
    .gitignore
    .git
    .travis.yml

    the hidden files break the upgrade in secure environments (Debian WordPress with FTP ACLS) and/or are not handled properly in the manifest in the upgrade process.

    Users with FTP and ACLs can capture the error in staging in their FTP logs similar to below

    Sat May 1 13:06:41 2021 [pid 20133] [ftpsecure] FAIL CHMOD: Client “127.0.0.1”, “/usr/share/wordpress/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/phenx/php-font-lib/.htaccess 644”

    Which is fixed by removing the hidden files in this path from the .zip, moving the plugin manually out of the plugins dir, and re-uploading locally, and re-activating.

    I thought we had posted previously on this error introduced in previous versions, but there is a lot going on in the forum and I did not find previous post using search

    For GUI only users, without this fix, you basically get the “Failed to Copy” error in the automatic plugin upgrade, and the plugin is just removed from the plugins list. Trying to install overtop manually via GUI even with a working old version results in a directory conflict.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Thanks for reporting! We have not had any other reports of this error, and I think this may be due to your ACL configuration. Could you share this with us? Is there something in there that blocks hidden files specifically?

    Thread Starter i.macdonald

    (@imacdonald-1)

    It seems that certain chmod actions via ftpsockets are failing [in created directories with hidden files], and a change on the FS method to ftpext resolves it, even though it is still via FTP.

    Indeed we were not able to replicate the failed chmod using FTP directly via localhost on the cli with the same user and ACLs.

    We do not know why this happens with ftpsockets vs ftpext for local FTP upgrades, but we captured a similar instance with another plugin and then started to look more closely. It seems not many plugin upgrades are chmoding hidden files, so it was not caught.

    We do not know why this workaround works, or what causes it not to work. It seems likely that via sockets has some constraints beyond just the ACLs in newly created directories, possibly using a different creation mask during the upgrade session that results in the permission change.

    Below the change that worked and our acl just for reference

    #define(‘FS_METHOD’,’ftpsockets’);
    define(‘FS_METHOD’,’ftpext’);

    Redacted facl with changed username:
    `~# getfacl /usr/share/wordpress/wp-content/plugins/
    user:[ftpuser]:rwx
    default:user:[ftpuser]:rwx

    ~# getfacl /usr/share/wordpress/wp-content/upgrade/
    user:[ftpuser]:rwx
    default:user:[ftpuser]:rwx

    ~# getfacl /usr/share/wordpress/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/
    user:[ftpuser]:rwx
    default:user:[ftpuser]:rwx

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘woocommerce-pdf-invoices-packing-slip hidden files breaking upgrade’ is closed to new replies.