add target to set user-perms

This commit is contained in:
Balakrishnan Balasubramanian 2023-10-10 11:16:39 -04:00
parent 25ba80671f
commit 5593dd0433

View File

@ -19,7 +19,7 @@ sd-reload: ## Run this after editing systemd service/timer files
.PHONY: sd-users
sd-users: ## Run this after adding new users
sudo systemctl restart systemd-sysusers.service
sudo systemctl restart systemd-sysusers.service
.PHONY: save-perms
save-perms: ## Saves the file permissions to ./acl. Run this after adding new files with correct permissions
@ -29,6 +29,12 @@ save-perms: ## Saves the file permissions to ./acl. Run this after adding new f
set-perms: ## Restores permissions of all files from ./acl
sudo setfacl --restore acl
# TODO: Remove glob
.PHONY: user-perms
user-perms: ## Grant running user all permissions. Need for git operations. Does not get copied to real filesystem
find root -type f | xargs sudo setfacl -m "u:${USER}:r"
find root -type d | xargs sudo setfacl -m "u:${USER}:rwx"
.PHONY: skel
skel: ## Creates common directories needed
mkdir -p root/etc/