Skip to content

Instantly share code, notes, and snippets.

@patrocle
patrocle / Chroot SFTP user with www-data rights.md
Last active October 10, 2024 16:37
SFTP MYUSER will have all rights to create files/folders with www-data as owner and group in /var/www

Debian tips to chroot a user in it's home and add rights for www-data

STEP 1

sudo apt-get -y install bindfs

STEP 2

sudo mkdir -p /home/MYUSER/www
sudo chown -Rf MYUSER:MYUSER /home/MYUSER/www