Skip to content

Instantly share code, notes, and snippets.

View si-m's full-sized avatar

Santiago si-m

View GitHub Profile
@daks
daks / restore_permissions.sh
Last active March 15, 2018 15:19
restore permissions and user/group on Linux/Unix
# sometimes, when changing permission or ownership you run a command like
# chown -R www-data: .*
# and it does what you want correctly: change ownership on dotfiles
# but it does also what you don't want: change ownership on all files which are in the parent directory
# which is really bad
# the solution, taken from http://sysadminnotebook.blogspot.fr/2012/06/how-to-reset-folder-permissions-to.html
# 1. on a snapshot or another Debian installation run
find / -exec stat --format "chmod %a %n" {} \; > /tmp/restoreperms.sh
@it-is-michal
it-is-michal / awesome_i3wm.md
Last active January 10, 2023 20:28
My current i3wm config