add target to set user-perms
This commit is contained in:
parent
25ba80671f
commit
5593dd0433
8
Makefile
8
Makefile
@ -19,7 +19,7 @@ sd-reload: ## Run this after editing systemd service/timer files
|
|||||||
|
|
||||||
.PHONY: sd-users
|
.PHONY: sd-users
|
||||||
sd-users: ## Run this after adding new users
|
sd-users: ## Run this after adding new users
|
||||||
sudo systemctl restart systemd-sysusers.service
|
sudo systemctl restart systemd-sysusers.service
|
||||||
|
|
||||||
.PHONY: save-perms
|
.PHONY: save-perms
|
||||||
save-perms: ## Saves the file permissions to ./acl. Run this after adding new files with correct permissions
|
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
|
set-perms: ## Restores permissions of all files from ./acl
|
||||||
sudo setfacl --restore 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
|
.PHONY: skel
|
||||||
skel: ## Creates common directories needed
|
skel: ## Creates common directories needed
|
||||||
mkdir -p root/etc/
|
mkdir -p root/etc/
|
||||||
|
Loading…
Reference in New Issue
Block a user