Report this

What is the reason for this report?

How To Set New User SFTP Permissions Restricted To WordPress Uploads Folder

Posted on June 23, 2020

As I follow along “How To Enables SFTP Without Shell Access on Ubuntu 18.04” I was able to achieve exactly as shown in the tutorial. That is:

  1. Create a new user “sammyfiles”
  2. Create a folder “/var/sftp/uploads”
  3. Give “sammyfiles” permission to upload files to “/var/sftp”

However, after replicating it exactly like this:

  1. Create a new user “sammyfiles”
  2. Create a folder “/var/www/html/wp-content/uploads/csv”
  3. Give “sammyfiles” permission to upload files to “/var/www/html/wp-content/uploads”

I was unable to achieve the ability for sammyfiles to access the folder. It always gives me the following error:

packet_write_wait: Connection to 127.0.0.1 port 22: Broken pipe

I need a new user to be able to upload content directly to the WordPress uploads folder only - nothing more, nothing less.

The issue seems to be that of setting permissions. Any help would be GREATLY appreciated as my business depends on this feature.

Thanks in advance.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

Make sure the new user is added to the group which is used by the uploads directory. If you’re having any issues feel free to paste the information about the users and the permissions you’ve set here so we can check them.

Another option will be to structure the whole project in a way such users can collaborate between them and also track changes.

Regards

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.