move chmod from mkaysi.github.com/misc/chmod.sh

This commit is contained in:
Mika Suomalainen 2013-02-06 16:45:29 +02:00
parent 444acd5675
commit 6db24a34a4
3 changed files with 37 additions and 9 deletions

View File

@ -11,10 +11,10 @@ cat .environment.MKAYSIGREP > ~/.environment
cat .gitconfig.MKAYSIGREP > ~/.gitconfig cat .gitconfig.MKAYSIGREP > ~/.gitconfig
mkdir -p ~/.ssh mkdir -p ~/.ssh
cat .keys/ssh > ~/.ssh/authorized_keys cat .keys/ssh > ~/.ssh/authorized_keys
chmod 700 ~/.ssh --recursive
gpg --quiet --import .keys/0x4DB53CFE82A46728.asc& gpg --quiet --import .keys/0x4DB53CFE82A46728.asc&
chmod 700 ~/.gnupg --recursive
mkdir -p ~/.public_html/ mkdir -p ~/.public_html/
chmod 711 ~ chmod a+xr chmod
chmod 755 ~/.public_html ./chmod
cat chmod > ~/chmod
chmod a+xr chmod
# vim : set ft=sh : # vim : set ft=sh :

29
chmod Executable file
View File

@ -0,0 +1,29 @@
#!/usr/bin/env bash
# This script removes permissions from other people than the owner to
# files/folders that they don't have access to and where they don't need
# access.
## THIS SCRIPT HAS MOVED TO SHELL-THINGS AS "chmod"!
## https://raw.github.com/Mkaysi/shell-things/master/chmod
echo "Denying Reading, Writing and eXecuting from other users in"
echo "your home directory $HOME ."
chmod g-rwx,o-rwx $HOME -R
echo "Creating empty oidentd user configuration file, if it doesn't"
echo "already exist."
touch ~/.oidentd.conf
echo "Allowing other users to read oidentd configuration file."
chmod u+rw,g-wx+r,o-wx+r ~/.oidentd.conf
echo "Denying directory listing from other users and allowing them to"
echo "access files/folders where they have permissions."
touch ~/.ICEauthority
chmod o-rw+x,g-rw+x ~
echo "Creating apache2 UserDir..."
mkdir ~/public_html/
echo "Allowing everyone to Read and eXecute everything in your apache2"
echo "userdir".
chmod o+rx-w,g+rx-w ~/public_html/ -R

View File

@ -12,10 +12,9 @@ cat xsessionrc > ~/.xsessionrc
cat pastebinit.xml > ~/.pastebinit.xml cat pastebinit.xml > ~/.pastebinit.xml
gpg --quiet --import .keys/0x4DB53CFE82A46728.asc& gpg --quiet --import .keys/0x4DB53CFE82A46728.asc&
mkdir -p ~/.ssh mkdir -p ~/.ssh
chmod 700 ~/.ssh --recursive chmod a+xr chmod
chmod 700 ~/.gnupg --recursive ./chmod
mkdir -p ~/.public_html/ cat chmod > ~/chmod
chmod 711 ~ chmod a+xr chmod
chmod 755 ~/.public_html
# vim : set ft=sh : # vim : set ft=sh :
#chmod 700 $HOME -R #chmod 700 $HOME -R