I've got a Debian 8 server running where /var/www
is owned by www-data
and has the permissions drwxr-xr-x
for both, files and subdirectories.
Since I need to upload files via SFTP (public/private key authentication; password and non-encrypted FTP is blocked) I thought it should be no problem to add my user account to the group www-data
. Thus, I exectued:
sudo usermod --append --groups www-data my-user
I already logged out of the current SSH session in order to trigger a reload of the permissions. id my-user
now shows:
uid=1000(my-user) gid=1000(my-user) groups=1000(my-user),33(www-data)
However, I am still unable to write data via SFTP in /var/www
. Even a simple touch test.txt
directly via SSH fails with Permission denied
.
I thought rwx
is read
, write
and execute
. Obviously my understanding of the directory/file permissions is incomplete. Can someone help?