0

Running chromium as a snap on Centos 7

Name      Version        Rev   Tracking  Publisher   Notes
chromium  80.0.3987.100  1026  stable    canonical✓  -

Logs the error:

/snap/chromium/1026/bin/desktop-launch: line 366: cannot create temp file for here-document: No such file or directory

Running an strace (sudo strace -u user /var/lib/snapd/snap/bin/chromium) shows the snap checks permissions on /tmp but then fails to make a directory /tmp/sh-thd.dmraw1.

stat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=0, ...}) = 0
faccessat(AT_FDCWD, "/tmp", W_OK)       = 0
statfs("/tmp", {f_type=EXT2_SUPER_MAGIC, f_bsize=4096, f_blocks=9778311, f_bfree=7162501, f_bavail=6660025, f_files=2493680, f_ffree=2256716, f_fsid={1298697036, 141663547}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0
getpid()                                = 32094
openat(AT_FDCWD, "/tmp/sh-thd.dmraw1", O_RDWR|O_CREAT|O_EXCL, 0600) = -1 ENOENT (No such file or directory)
fstat(2, {st_mode=S_IFREG|0664, st_size=2241070, ...}) = 0
write(2, "/snap/chromium/1026/bin/desktop-"..., 119/snap/chromium/1026/bin/desktop-launch: line 366: cannot create temp file for here-document: No such file or directory

Permissions on /tmp seem normal (set to 1777), we have plenty of space and inodes.

drwxrwxrwt 450 root root 9680 Feb 19 15:07 /tmp

Filesystem      Size  Used Avail Use% Mounted on
tmpfs            10G  280M  9.8G   3% /tmp

Filesystem       Inodes IUsed    IFree IUse% Mounted on
tmpfs          16116906 13829 16103077    1% /tmp

I suspect something's happening with the way chromium child processes are unable to share files in /tmp, which would be a normal thing for snap isolation. Anyone seen anything like this before?

s n
  • 31
  • 1
  • 4

1 Answers1

0

This was caused by a doubly mounted /tmp filesystem; with /tmp mounted twice in the same location it looked like permissions were set world writeable, but the OS was honoring the permissions on the underlying /tmp filesystem that was read-only.

s n
  • 31
  • 1
  • 4