Can you check the user group from a $remote_user?
location ~ ^/dav/(.*)$ {
alias /home/$remote_user/$1;
auth_pam "Restricted";
auth_pam_service_name "nginx";
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_access group:rw all:r;
create_full_put_path on;
}
location ~ ^/home/(.*)$ {
alias /home/$1;
#check the group of the $remote_user;
}
curl -T test.txt 'http://gert:passwd@127.0.0.1/dav/'
Best Answer
/usr/local/nginx/conf/nginx.conf
/etc/pam.d/nginx
/usr/local/nginx/conf/nginx.group
curl -T test.txt 'http://gert:passwd@127.0.0.1/dav/'
curl 'http://friend:passwd@127.0.0.1/home/gert/test.txt'