cannot create user data directory: /opt/appserver/snap/chromium/1646: Permission denied

Bug #1932990 reported by Ray Kiddy
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

All I am getting is:

cannot create user data directory: /opt/appserver/snap/chromium/1646: Permission denied
Jun 18, 2021 9:11:36 PM org.openqa.selenium.os.OsProcess checkForError

But:

# ls -ld /opt/appserver/snap/chromium/1646
drwxr-xr-x 2 appserver appserveradm 4096 Jun 18 20:46 /opt/appserver/snap/chromium/1646

The application (a java app) that is making the call to selenium is owned by appserver. So what could the problem be?

Revision history for this message
Ray Kiddy (ray-ganymede) wrote :

Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-73-generic x86_64)

Revision history for this message
Chris Guiver (guiverc) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command only once, as it will automatically gather debugging information, in a terminal:

apport-collect 1932990

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

FYI: I suspect the issue is you're forgetting the snap runs in a sandboxed environment, and thus has limited access to your host file-system (and it's own fs is squashfs thus RO), though you can grant access to certain directories via 'snap connect' etc. See https://ubuntu.com/blog/a-guide-to-snap-permissions-and-interfaces, however apport detail may provide clues.

Revision history for this message
Ray Kiddy (ray-ganymede) wrote :

I am investigating whether I can fix the error by using an option, '--user-data-dir=/tmp', when I launch the chromiumdriver.

First, snap has made the use of this simple tool, chromiumdriver, much more complex.

Second, I have tried to uninstall the snap version of the tool and I cannot now install a non-snap version. Somehow snap has soured the soup.

If it is going to cause these kinds of problems, I am certainly not going to be trying to use snap for other tools unless I have to. If the install requirements are very complex, such as with installing certificates, snap is a good thing. But when the install process is simple, one should not use snap? Is that the solution?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in chromium-browser (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.