change ownership to for running as caddy user but keeping the rest as sysadmin
parent
a31117a7a9
commit
ab07d9c4a4
|
@ -4,3 +4,5 @@ DIR=$(dirname "$(dirname "$(readlink -f "$0")")") || exit
|
|||
echo Making Link to $ARCH binary in $DIR/bin/$ARCH/caddy
|
||||
rm $DIR/caddy
|
||||
ln -s $DIR/bin/$ARCH/caddy $DIR/caddy
|
||||
sudo chown caddy:sysadmin $DIR/bin/$ARCH/caddy
|
||||
sudo chown -h caddy:sysadmin $DIR/caddy
|
||||
|
|
|
@ -13,8 +13,8 @@ sudo useradd --system \
|
|||
--comment "Caddy web server" \
|
||||
caddy
|
||||
sudo passwd caddy
|
||||
sudo chown caddy:caddy -R /opt/caddy
|
||||
sudo usermod -a -G caddy sysadmin
|
||||
source /opt/caddy/scripts/own
|
||||
sudo chmod g+rw -R /opt/caddy
|
||||
cat /etc/passwd | grep caddy
|
||||
cat /etc/passwd | grep sysadmin
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
sudo chown caddy:caddy -R /opt/caddy
|
||||
sudo chown caddy:sysadmin -R /opt/caddy/conf
|
||||
sudo chown caddy:sysadmin /opt/caddy
|
||||
sudo chmod g+rw -R /opt/caddy
|
||||
|
||||
|
|
Loading…
Reference in New Issue