]> Arthur Taft Gitweb - website.git/commitdiff
add script to change file permissions
authorArthur Taft <[email protected]>
Mon, 24 Nov 2025 07:03:31 +0000 (00:03 -0700)
committerArthur Taft <[email protected]>
Mon, 24 Nov 2025 07:03:31 +0000 (00:03 -0700)
change-perms [new file with mode: 0755]

diff --git a/change-perms b/change-perms
new file mode 100755 (executable)
index 0000000..59faa92
--- /dev/null
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+if (( EUID != 0 )); then
+    echo "Script must be ran as root!"
+    exit 1
+fi
+
+chown -R root:nginx /var/www/arthurtaft.net
+
+find /var/www/arthurtaft.net -type d -exec chmod 755 {} \;
+
+find /var/www/arthurtaft.net -type f -exec chmod 644 {} \;