Skip to content

Instantly share code, notes, and snippets.

@Owned67
Owned67 / Chroot SFTP user with www-data rights.md
Created October 1, 2024 06:36 — forked from patrocle/Chroot SFTP user with www-data rights.md
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