Ownership issue after uploading files

Hello all

I have an issue where, when I sftp files into my server they aren’t owned by the www-data user/group so every time I need to run a chown to give them the proper permissions. Is there any way I can set it up so whatever I upload as a member of the www group will have the same permissions as the www user and eliminate the need to chown after?

This is what I do for all my setups… this is direct from my cookbook for server setup

---- SFTP ---- Guide: https://easyengine.io/tutorials/linux/setup-sftp/ OPTIONAL: SFTP per site: https://easyengine.io/docs/chroot-sftp-easyengine/ OPTIONAL: ADD SSH User to www-data group: Creating an FTP account / FTP Access for easy engine websites

  1. SSH into server
  2. sudo passwd www-data
  3. choose a secure password
  4. nano /etc/passwd
  5. change /usr/sbin/nologin to /bin/bash
  6. save and exit

Create a new SFTP account in Filezilla/CyberDuck Server = IP Username = www-data Password = New Password you set

This is perfect thanks!