mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-25 20:59:23 +01:00
chmod: remove useless variables & setfacl & wwwuser
setfacl was used to give HTTPd write permission, but setfacl cannot do that, because it can only give permissions which group has and group has only permissions to read and execute, not write. Someone should check if things in this script are even sane.
This commit is contained in:
parent
39899096cd
commit
621f44daca
12
chmod
12
chmod
@ -6,12 +6,6 @@
|
|||||||
## https://raw.github.com/Mkaysi/shell-things/master/chmod
|
## https://raw.github.com/Mkaysi/shell-things/master/chmod
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
GROUP=$(id -gn)
|
|
||||||
|
|
||||||
wwwdata=$(head -n1 wwwuser)
|
|
||||||
|
|
||||||
setfacl=$(locate setfacl|grep bin|head -n1)
|
|
||||||
|
|
||||||
chmod g-rwx,o-rwx $HOME -R
|
chmod g-rwx,o-rwx $HOME -R
|
||||||
|
|
||||||
touch ~/.oidentd.conf
|
touch ~/.oidentd.conf
|
||||||
@ -27,16 +21,10 @@ chmod -R 755 ~/public_html/
|
|||||||
touch ~/.face
|
touch ~/.face
|
||||||
touch ~/.forward
|
touch ~/.forward
|
||||||
touch ~/.netrc
|
touch ~/.netrc
|
||||||
echo ""
|
|
||||||
chmod a+r-wx,u+rw ~/.face
|
chmod a+r-wx,u+rw ~/.face
|
||||||
chmod a+r-wx,u+rw ~/.forward
|
chmod a+r-wx,u+rw ~/.forward
|
||||||
chmod 600 ~/.netrc
|
chmod 600 ~/.netrc
|
||||||
|
|
||||||
if [[ -f $setfacl ]]; then
|
|
||||||
setfacl -R -m u:$wwwdata:rwx ~/public_html
|
|
||||||
setfacl -R -m d:u:$wwwdata:rwx ~/public_html
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f chmod.2 ]; then
|
if [ -f chmod.2 ]; then
|
||||||
./chmod.2
|
./chmod.2
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user