Thanks for the suggestion, and you're right, your summary is better. I tried the following (with various permutations).
sudo su -l -s /bin/bash www-data mkdir /tmp/chromium-home HOME=/tmp/chromium-home /usr/bin/timeout 60 chromium-browser --no- sandbox --headless --disable-gpu --window-size=2048,1448 --screenshot='/tmp/dummy.pdf' --user-data-dir=/tmp/chromium-home 'http://localhost/...' and this complains in a different way: Sorry, home directories outside of /home are not currently supported. See https://forum.snapcraft.io/t/11209 for details. Before the snap change was made, chromium would run headless without (I think) actually needing any writeable directory at all. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1849371 Title: [snap] Cannot run headless chromium as user www-data To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1849371/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs