PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Some uploads can't be viewed (403 forbidden; file permissions deny server access

  1. iron
    Member

    Some uploaded files (example.org/wp-content/uploads/gravity_forms/2/2011/11/file.pdf) can't be viewed, showing 403 Forbidden.

    Apache log says Permission denied: file permissions deny server access and FTP shows these files as rw-------.

    But most files in /gravity_forms/ are rw-r--r--, which allows them to be viewed. The rw------- files seem to be distributed randomly.

    Any idea why GF is saving some with the wrong permissions, and how I could fix it?

    Posted 7 years ago on Tuesday December 13, 2011 | Permalink
  2. I'm not sure why that would be, most likely something with the server configuration. But there is a hook in Gravity Forms that will allow you to override the default permissions.

    gfrm_file_permission

    Here is an explanation of where you place that code (in your theme's functions.php):
    http://www.gravityhelp.com/documentation/page/Where_Do_I_Put_This_Code%3F

    Posted 7 years ago on Thursday December 15, 2011 | Permalink
  3. iron
    Member

    Thanks, Chris.

    Posted 7 years ago on Thursday December 15, 2011 | Permalink
  4. Were you able to resolve this issue, iron?

    Posted 7 years ago on Thursday December 15, 2011 | Permalink