How do I give FTP client permission to write WordPress files?

File permissions don't seem to be working correctly. I've tried to setup it myself, but was unable. I want to be able to upload and modify files using my PHP CMS, Wordpress, and from the FTP client. At the moment, I can't do that because the FTP user is not able to change files created by PHP. Any help would be appreciated!

1 Reply

How do I give FTP client permission to write WordPress files?

Well, Hello There!

If I'm understanding you correctly, you would like your FTP users to have permission to modify your WordPress files.

Is it possible?

Yes, it is indeed possible. However, it's not really advisable. For security reasons, the actual files in your WordPress folder should have permissions like:

644 or -rw-r--r-- = YES

This will give the owner read and write privileges. Group and other will have read privileges for the files.

Not:

777 or -rwxrwxrwx = NO

This will give unlimited access to everyone which is not very secure.

This handy Stackoverflow forum post digs a little deeper into this information.

Add Users to Groups

All of those files should be owned by your Wordpress user and user group, so, you don't want to chown those files or folders. Another option is to grant those users specific permissions to the folder by adding them to the Wordpress user's group using the below command. You'll need to be logged in as the root user in order to run the command.

  • Debian/Ubuntu

adduser $USER $USERGROUP

  • CentOS

usermod -aG $USERGROUP $USER

FTP Client Permissions

Without knowing your exact FTP client, I can't offer specific steps to set file permissions. But this link from Host Papa has some useful instructions for popular FTP clients.

I hope this information is helpful. Please, don't hesitate to leave a comment below or add any additional resources that helped you achieve your goal.

Happy file transferring!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct