This guide explains how to properly set up Chromium and ChromeDriver on Ubuntu servers for browser automation tasks using tools like Selenium WebDriver.
On Ubuntu (especially 20.04 and newer), the chromium-browser
package in the default repositories is actually just a transitional package that redirects to the Snap version. This Snap-packaged version of Chromium runs in a confined environment with restricted filesystem access, which often causes permission issues when used with browser automation tools.
Common errors you might encounter with the Snap version include:
cannot create default profile directory