0

I accidentally executed umask 077 while in the folder /etc/apt. What are the consequences of this? Could I have broken something? How can I undo it?

Eliah Kagan
  • 117,780
jayden
  • 31

2 Answers2

1

umask is not folder specific, but tells applications what default permissions to give newly created files. The default umask is 022 which disables group and world write permissions.

If instead you did a chmod to change the permissions of /etc/apt, you can execute the command "chmod /etc/apt 755" to restore its proper permissions.

This is what you should see:

ls -latd /etc/apt

drwxr-xr-x 7 root root 4096 Aug 21 2019 /etc/apt/

0

If you executed umask and then did not write anything to that folder, you probably didn't make any changes, because umask applies only to "future", ie. to new files that are created after execution of the umask command.

Value set by umask stays effective until you execute the next umask command or until you end the terminal session where you executed the command (which you probably already did).

So probably you didn't change anything and there's nothing to undo.

raj
  • 10,353