Score:0

Loop login - /tmp permission issue

tl flag

I am facing loop login issue on Ubuntu 22.10.

I was able to log into the shell and observed the following /tmp permissions:

drwxr-xr-x 20 arnaud arnaud 60K mars 24 08:55 tmp

I was able work around it by running in the shell the following commands:

chmod 1777 /tmp
sudo chown root:root /tmp
sudo service gdm3 restart

Though, every time the computer is rebooted, I face the issue again.

I suspect an issue with snap. After login, when I try to run a snap installed software, I get this error /tmp/snap-private-tmp has unexpected ownership / permissions: File exists. Actually, I can see that /tmp/snap-private-tmp has only subfolder,snap.snapd-desktop-integration

After removing folder /tmp/snap-private-tmp, I can run the program, but the problem happens again after reboot.

Any thoughts why /tmp permissions are screwed at each boot?

David avatar
cn flag
You messed with a system folder permissions. tmp. Never mess with system folders in this manner. Deleting the folder and letting the system recreate it fixed that one. You could try removing the unnamed snap software and see if the problem goes away.
iguanito avatar
tl flag
I have not changed the `/tmp` permissions before the issue happened, and each reboot its permissions are screwed again. I edited the question to mention that `snap.snapd-desktop-integration` is present in `/tmp/snap-private-tmp` at startup
hr flag
The creation of /tmp (and subdirectories therein) is now controlled by systemd-tmpfiles, based on configuration files in `/etc/tmpfiles.d/` and `/lib/tmpfiles.d/` - so check there for "rogue" directives (ex. `grep -r arnaud /lib/tmpfiles.d/`)
waltinator avatar
it flag
Read `man hier`, the Filesystem Hieracy Standard. Your use of `/tmp` may be confusing to your system. Is there another directory you could use? Read `man mkdir`.
iguanito avatar
tl flag
@steeldriver yeah, `systemd-tmpfiles` seemed to be a good thing to check. Though,I could not find any rogue directives anywhere. The good thing is that I don't face the issue anymore. I don't know why it got fixed (maybe a package update)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.