WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WP asks for FTP despite 777 permissions (11 posts)

  1. Stephen304
    Member
    Posted 11 months ago #

    I set all my files to permission 777 and it still asks for FTP info. How can I allow wordpress to directly access the files? php runs as www-data and the files are stephen:www-data, and because of the group permissions, php should be able to have full access...

  2. Keith Driscoll
    Member
    Posted 11 months ago #

    The reason it's asking for FTP credentials is not because of permissions. WordPress will ask for FTP credentials whenever the current apache user and the folder owner do not match. It actually creates a temporary file to test this. You need to change ownership all folders in your WP installation to 'www-data' using the # chown command.

    I believe this was implemented as a security feature :)

  3. Stephen304
    Member
    Posted 11 months ago #

    The main problem is that whenever I ftp files, it will cause the problem again because I don't log in as ftp as www-data.

    Normal hosts don't have this problem, how do they do it? Do they have files uploaded as www-data regardless of the login that was used?

  4. ClaytonJames
    Member
    Posted 11 months ago #

    Some good information in this article: Permission Scheme for WordPress

  5. Stephen304
    Member
    Posted 11 months ago #

    I don't get it, that page recommends having all the files owned by the user. Wouldn't that cause the original problem?

  6. Keith Driscoll
    Member
    Posted 11 months ago #

    Have you tried the solution I posted? This is not a permissions issue as proven by setting all files (and folders) to '777'. I just noticed you stated 'files' in your original post. Did you change folder permissions as well?

    If you are interested in understanding the solution here is an external post http://www.chrisabernethy.com/why-wordpress-asks-connection-info/

  7. Stephen304
    Member
    Posted 11 months ago #

    Ah, so unless I am reinstalling wordpress or wiping the whole install, it should stay solved?

  8. Keith Driscoll
    Member
    Posted 11 months ago #

    Yes. That should permanently fix the issue :)

  9. Keith Driscoll
    Member
    Posted 11 months ago #

    Oh, and when you get it working be sure to change your file/folder permissions to something more secure than '777' :)

  10. Stephen304
    Member
    Posted 11 months ago #

    Yes, that's the plan :) Had 660 before for files and 770 for folders.

  11. ClaytonJames
    Member
    Posted 11 months ago #

    @Keith Driscoll is right in that it isn't so much a numeric permissions issue as it is an ownership issue in this case.

    If it's a localhost installation just for development and not exposed to the WAN, you'll be fine, but if this is a live site, you may really want to consider whether or not having all of your files owned and writable by the web server user is something you really want to do.

    It might be worth doing some additional investigation. Just a suggestion, mind you.. you're free to do as you like of course. :-)

    I set all my files to permission 777 and it still asks for FTP info. How can I allow wordpress to directly access the files?

    A little more in depth discussion on that topic, if you're interested.
    WordPress Filesystem Abstraction FAQ

Reply

You must log in to post.

About this Topic