Title: Filesystem API / permissions
Last modified: November 15, 2016

---

# Filesystem API / permissions

 *  [MrGregWaugh](https://wordpress.org/support/users/mrgregwaugh/)
 * (@mrgregwaugh)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/filesystem-api-permissions/)
 * In version 4.0.0 of this plugin the WP_Filesystem API is being used to read the
   recently uploaded files from the default WP upload directory. In the event that
   the WP_CONTENT directory is not writeable, the underlying call to the WP get_filesystem_method()
   will fall back to something other than ‘direct’. In some WP production installations
   the WP_CONTENT directory will not be writeable, only the WP_CONTENT/uploads directory
   will be, and the end result being Windows_Azure_File_Contents_Provider::is_valid()
   will fail with ‘Access to WordPress filesystem has not been granted’.
 * A workaround is to explicitly define the FS access method as ‘direct’ by setting
   the following in wp-config.php:
 * define( ‘FS_METHOD’, ‘direct’ );
 * What’s happening in the plugin is in the case where where wp-content is not writeable
   and FTP or SSH credentials aren’t specified (because they aren’t used) the call
   to WP_Filesystem() inside of Windows_Azure_Filesystem_Access_Provider::get_provider()
   will fail and $filesystem_access never gets initialized, so the upload fails 
   in the middle. This all happens before the $force_direct_access is checked too,
   so that has no effect in this case.
 * This would seem to be somewhat of a design/configuration issue with WordPress,
   however since the Azure plugin doesn’t actually need write access, it shouldn’t
   cause the uploads to fail. Potentially, this could be checked for earlier, and/
   or produce a warning or something?
 * Thanks for the great plugin!
 * GW

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [Ritesh Patel](https://wordpress.org/support/users/ritteshpatel/)
 * (@ritteshpatel)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/filesystem-api-permissions/#post-8443334)
 * Hi [@mrgregwaugh](https://wordpress.org/support/users/mrgregwaugh/)
 * Thanks for the thorough report. We are looking into this and will follow up on
   the ticket shortly.
 * Regards,
    Ritesh
 *  Plugin Contributor [Ritesh Patel](https://wordpress.org/support/users/ritteshpatel/)
 * (@ritteshpatel)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/filesystem-api-permissions/#post-8455051)
 * Hi [@mrgregwaugh](https://wordpress.org/support/users/mrgregwaugh/)
 * We have added admin notice if direct filesystem access is not allowed. We also
   have introduced new filters using which you can make it work in such setup. These
   filters are under develop branch currently and you can check those here: [https://github.com/10up/windows-azure-storage/tree/develop](https://github.com/10up/windows-azure-storage/tree/develop)
 * Regards,
    Ritesh

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Filesystem API / permissions’ is closed to new replies.

 * ![](https://ps.w.org/windows-azure-storage/assets/icon-256x256.png?rev=2486101)
 * [Microsoft Azure Storage for WordPress](https://wordpress.org/plugins/windows-azure-storage/)
 * [Support Threads](https://wordpress.org/support/plugin/windows-azure-storage/)
 * [Active Topics](https://wordpress.org/support/plugin/windows-azure-storage/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/windows-azure-storage/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/windows-azure-storage/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Ritesh Patel](https://wordpress.org/support/users/ritteshpatel/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/filesystem-api-permissions/#post-8455051)
 * Status: not resolved