WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] File Permission Problem (3 posts)

  1. johnosmond
    Member
    Posted 1 year ago #

    Whenever I install or update a plugin then that plugin's directory permission settings get set to 777 (not by me, by wordpress).

    My server is not one of those ones that require 777 for ftp uploads or whatever. Normally 755 (for dirs) and 644 (for files) works fine. But wordpress seems to be resetting them to 777 for both dirs and files.

    And it only occurs on the directory being installed or updated. Other dirs are not affected.

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    WordPress itself cannot change permissions on an existing folder, so I can only guess that this is due to a server configuration setting somewhere.

  3. johnosmond
    Member
    Posted 1 year ago #

    I found this in my config file:

    define( 'FS_METHOD', 'direct' );
    define( 'FS_CHMOD_DIR', 0777 );
    define( 'FS_CHMOD_FILE', 0777 );

    I'm not entirely sure how it got there, but I suspect that someone who was helping me in the past was having permission problems, etc. Maybe this was part of a temporary fix.

    @esmi, thanks for your reply. I just learned that if these are in your congif file then, yes, wordpress (thru php, of course) can change those settings!

    Hope that helps someone someday!

Topic Closed

This topic has been closed to new replies.

About this Topic