{"id":18106327,"date":"2024-10-31T03:46:45","date_gmt":"2024-10-31T03:46:45","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/filesystem-issue\/"},"modified":"2024-10-31T05:28:07","modified_gmt":"2024-10-31T05:28:07","slug":"filesystem-issue","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/filesystem-issue\/","title":{"rendered":"Filesystem issue"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I could see many tickets relating errors caused by file system initialization error:<\/p>\n\n\n\n<ul>\n<li><a href=\"https:\/\/wordpress.org\/support\/topic\/latest-update-causing-cli-fatal-error\/\">https:\/\/wordpress.org\/support\/topic\/latest-update-causing-cli-fatal-error\/<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wordpress.org\/support\/topic\/critical-error-activating-spectra\/\">https:\/\/wordpress.org\/support\/topic\/critical-error-activating-spectra\/<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wordpress.org\/support\/topic\/spectra-uag-clash-with-woocommerce-9-2-2\/\">https:\/\/wordpress.org\/support\/topic\/spectra-uag-clash-with-woocommerce-9-2-2\/<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/wordpress.org\/support\/topic\/fatal-error-uncaught-typeerror-ftp_fget\/\">https:\/\/wordpress.org\/support\/topic\/fatal-error-uncaught-typeerror-ftp_fget\/<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The natural solution is to force to <code>direct<\/code> method, as <a href=\"https:\/\/wordpress.org\/support\/topic\/critical-error-activating-spectra\/#post-16935308\">mentioned in this replay<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I am a hosting provider and we use the <code>SSH2<\/code> method to create a security layer for interacting with the WordPress file system. It does not allow PHP-FPM user to write to write to directories other than the uploads directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This plugin does not support this approach.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In my opinion, writing to the uploads directory should not to use the global <code>wp_filesystem<\/code> object. The WordPress core does not use. The  <code>wp_upload_bits<\/code> function is an example. Writing outside of the uploads should have the same experience as, for example, installing a plugin. When the FTP credentials is asked when it not set by constants.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I could not use any hook to swerve this behavior and respect the security settings applied to our WordPress installations.<\/p>\n","protected":false},"template":"","class_list":["post-18106327","topic","type-topic","status-publish","hentry","topic-tag-filesystem","topic-tag-improvement"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18106327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18106327\/revisions"}],"predecessor-version":[{"id":18106398,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18106327\/revisions\/18106398"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18106327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}