Skip to content

Instantly share code, notes, and snippets.

@thiphariel
Created December 11, 2014 11:07
Show Gist options
  • Select an option

  • Save thiphariel/d1e243ea1a5182501463 to your computer and use it in GitHub Desktop.

Select an option

Save thiphariel/d1e243ea1a5182501463 to your computer and use it in GitHub Desktop.
Add user sftp permissions
useradd someuser
mkdir -p /home/someuser/www
mount --bind /var/www /home/someuser/www
chmod g+s /home/someuser/www
chown -R someuser:www-data /home/someuser/www
setfacl -d -m g::rwx /home/someuser/www
# In /etc/fstab file ...
/var/www /home/someuser/www none bind 0 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment