Score:0

Why am I getting errors in apt after I deleted and then re-created `/tmp`, `/var/tmp`, and `/var/log`?

gs flag

Why am I getting an error after running the following commands?

sudo rm -r /tmp
sudo rm -r /var/tmp
sudo rm -r /var/log

sudo mkdir /tmp
sudo mkdir /var/tmp
sudo mkdir /var/log
sudo apt update

Error message:

Couldn't create temporary file /tmp/apt.conf.RFX4BR for passing config to apt-key
Couldn't create temporary file /tmp/apt.conf.GuJXFx for passing config to apt-key
(truncated)
Score:1
cn flag

/tmp/ needs to be

drwxrwxrwt  20 root     root      4096 jun  5 21:03 tmp

/var/tmp and /var/log need to be:

drwxrwxr-x 13 root syslog   4096 jun  4 00:00 log
drwxrwxrwt 13 root root     4096 jun  5 04:09 tmp

Please adjust those to the above using sudo chmod 1777 and sudo chown root:root for the two tmp's and sudo chown root:syslog for "log". And check if it then matches what it liste here using ls / and ls /var/.

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.