Score:0

Restoring correct file permissions for /var/

gb flag

Whilst running some chmod commands for Oxid 6, I made the rookie mistake of not double checking what was written fully and managed to chmod 777 /var -R as part of my command

How can I restore the default file permissions on /var/* for Ubuntu 22.04.2 LTS?

guiverc avatar
cn flag
That will very much depend on what backup strategy you have implemented? How are we to know? As for manually correcting the file permissions, it'll depend on what package(s) & changes you have made post-install; you can always create a VM of the same system & then get what needs to be corrected from that; otherwise just grab them from your backups.
Alex avatar
gb flag
I was hoping someone would be able to provide a chmod that would set the default file permissions on the standard /var/* folders or packages
guiverc avatar
cn flag
That will only exist if you've created such a backup strategy... Most of use don't use default systems (*and even a default system has no specific single value*) as permissions vary across packages etc... We keep backups so we can undo mistakes (*we all make mistakes!*) and what you did is something a lot of us did... Backups are your answer; restore those backups; or create a script (*what I've done*) copying the permissions from your backups; OR a new system installed to replicate what you had & thus can get the details from... Restoring data is by far fastest... My 2c.
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.