Site Overlay

Ubuntu and User Directory Perms

I use Multipass as my VM orchestrator, which means that when I spin up a VM for any project, I’m generally getting some version of Ubuntu.

There was a major change between Ubuntu 20.04 and 21.04: starting with 21.04, the user directory is set by default to 750 – where in 20.04 it is 755.

This means that by default other users can no longer browse the files in your user directory. But it also means that if you symlink a directory under /var/www/ to a directory in your home folder (a thing I do while I’m doing development of web applications that would normally live somewhere under /var/www), the webserver won’t be able to access the symlinked directory unless it can access the containing home directory, regardless of how many ways you specify FollowSymLinks in the config.

TIL. (this is as much of a reminder for me as for anyone else)

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll Up