Chmod for files: chmod u=rwx,g=rx,o=r myfile Get user and groups: id id www-data Adding a user to a group: sudo usermod www-apache --append --groups [groupname] Removing user from group sudo deluser username group Change ownership: chown {-R} [user]{:group} [file|directory] Change group: chgrp {-R} [group] [file|directory] Login with www-data user (www-data is set to /usr/sbin/nologin): sudo su -l www-data -s /bin/bash
Points regarding computing that I always forget - so I write them here to find them easily and maybe other could benefit too.