WordPress.org

Ready to get started?Download WordPress

Forums

Directory permissions for WP script (4 posts)

  1. pandorhu
    Member
    Posted 1 year ago #

    Hi,
    I installed the 3.4.2 version of WP and have a problem setting up the directory permissions.

    Everything I upload (files&folders) via FTP belongs to owner user1686 and group users. Permissions are 755 for dirs and 644 for files.
    When I first time try to upload media files, WP tries to create uploads folder under wp-content and fails. It's logical because WP scripts run under wwwrun/nobody owner/group.
    To solve this, I changed wp-content permissions for 777 temporary, but now uploads folder (and its subfolders/files) belongs to wwwrun/nobody user.
    Is there any way to keep every file&folder under FTP users ownership?
    (Nice solution for this is the upload of themes and plugins as FTP user from WP script.)

    Anyway, which WP directories should be writable/executable by WP script (which at me runs under wwwrun/nobody user)?

    It's strange not to find any info about this on the net...

  2. s_ha_dum
    Member
    Posted 1 year ago #

    You really need to have your ftp user's group match the server's user's group.

    See if this thread and this one help any.

  3. pandorhu
    Member
    Posted 1 year ago #

    I just wonder that in the WP install guide not mentioned this common situation - when the FTP user's group don't match the server's user's group.
    Am I right that if the FTP user and the server user are in different group, the flag for the /uploads should be 777, otherwise enough 775. (BTW in the uploads folder the WP script generates folders/files with 777/666 permission.)

    Any other folder/file should be writable by the running WP scipt?

  4. s_ha_dum
    Member
    Posted 1 year ago #

    I just wonder that in the WP install guide not mentioned this common situation - when the FTP user's group don't match the server's user's group.

    If that is the case, you have to pick one or the other. These permissions are controlled by the OS. Apache, PHP, or WordPress can't really do anything about it. It is up to the server administrator.

    '777' means anybody can write to the folder/file. It is very dangerous. You shouldn't do that. You are better off changing the ownership, or asking your host to do so.

Topic Closed

This topic has been closed to new replies.

About this Topic