mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-12-22 18:52:45 +01:00
chmod: following fixes
* Be verbose * fix command nesting * chmod ~/public_html to 755 (for php) * create netrc and set permissions to 600
This commit is contained in:
parent
63273e3895
commit
0b84baae26
11
chmod
11
chmod
@ -4,12 +4,13 @@
|
||||
# access.
|
||||
## THIS SCRIPT HAS MOVED TO SHELL-THINGS AS "chmod"!
|
||||
## https://raw.github.com/Mkaysi/shell-things/master/chmod
|
||||
set -x
|
||||
|
||||
GROUP=`id -gn`
|
||||
GROUP=$(id -gn)
|
||||
|
||||
wwwdata=`head -n1 wwwuser`
|
||||
wwwdata=$(head -n1 wwwuser)
|
||||
|
||||
setfacl=`locate setfacl|grep bin|head -n1`
|
||||
setfacl=$(locate setfacl|grep bin|head -n1)
|
||||
|
||||
chmod g-rwx,o-rwx $HOME -R
|
||||
|
||||
@ -21,13 +22,15 @@ touch ~/.ICEauthority
|
||||
chmod o-rw+x,g-rw+x ~
|
||||
|
||||
mkdir -p ~/public_html/
|
||||
chmod o+rx-w,g+rxw ~/public_html/ -R
|
||||
chmod -R 755 ~/public_html/
|
||||
|
||||
touch ~/.face
|
||||
touch ~/.forward
|
||||
touch ~/.netrc
|
||||
echo ""
|
||||
chmod a+r-wx,u+rw ~/.face
|
||||
chmod a+r-wx,u+rw ~/.forward
|
||||
chmod 600 ~/.netrc
|
||||
|
||||
if [[ -f $setfacl ]]; then
|
||||
setfacl -R -m u:$wwwdata:rwx ~/public_html
|
||||
|
Loading…
Reference in New Issue
Block a user