filter to chmod uploaded files (2 posts)

  1. Herbi
    Posted 6 years ago #


    I need to give new chmod rights to uploaded files.
    All uploaded files and genereated thumbnails have permissions 600, so I need to apply the rights 640.

    I want to realize this through a plugin:

    function dg_chmod_upload( $ret )
        @ chmod( $ret['file'], 0640 );
        return $ret;
    add_filter( 'wp_handle_upload', 'dg_chmod_upload' );

    But this does not solve the problems with the generated thumbnails. Which filter do I have to use to get the path of a just generated thumbnail?

  2. Herbi
    Posted 6 years ago #

    Nobody a idea?
    I also can't find the needed info in the codex.

Topic Closed

This topic has been closed to new replies.

About this Topic