chmod: rename & link & update & mention moving to shell-things.

This commit is contained in:
Mikaela Suomalainen 2013-02-06 16:41:41 +02:00
parent aa45abe8a5
commit e4d6ff99d4
4 changed files with 53 additions and 38 deletions

29
misc/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

22
misc/chmod.asc Normal file
View File

@ -0,0 +1,22 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Homepage: http://mkaysi.github.com/
Comment: Public key: http://mkaysi.github.com/PGP/0x82A46728.txt
Comment: gpg --fetch-keys http://mkaysi.github.com/PGP/0x82A46728.txt
Comment: Fingerprint = 24BC 1573 B8EE D666 D10A AA65 4DB5 3CFE 82A4 6728
Comment: How/Why I send emails like I do http://git.io/tkIyFQ
iQIcBAABCgAGBQJREmuHAAoJEE21PP6CpGcoFfUP/jrCesUPW1QtFNo/4wIqyzx4
mpHxfz4z9EKznte8Hwh2U0q+Gkh5HLbAxPibhrJ2CiSo3SQ982+JDOTf/Zp6cVZc
3xG0PZD8K+YOsAQvyAnxuWH4MZyDFIlLN92EQPyoAUptwO2U08G8ecyZgS+8iZYN
LSoWG8sN6UFQ/PMJBJNHDXFT2Muq521Bm7ZwNRFqqgPL9JzOeFLXh0mwYYAy/oJ0
DGQvqwTIHMPwN4zySHGTyHW3y9WQgPgR8CY+ZNQqPjlIcnuQA3l8oazR86rc7Ygc
ZWXVDg5JIyyjLQcQGw+RjG1HURjZ+sRn97mpvbu6iksagzhvqR1E2+hCDnDDVnRM
JiDMe14+VN4SZDt71gbuX0pw4UblDVssbngxG1ez5Z8xCWLVn1G058nr6vFnr6CW
eg33hOk1aMikdyVqX/UJAd7wCV328z4BQNQppmiKJCjgemytexiK6N5MhVXZLUXR
P7rNBPWvx5ot8hCQzxNwXXOu8lRuU5RmKsWBs0QUMj8HOD9JQkQnbWJdHBlA4MgU
+NkUyJpNj4c7v+wRGEVxp8aJG9mXOj/8Iud1M53VEOHBCDr17Koi7zcBZQoq5jhn
Ob0J9BDEoTGWsrdgMyJmslMG+EN5LJtmgAv8Tm6XNjd+/0wlMJfMM7TcVjcRIg8W
UscaW626WeR7SE5dyi6h
=pCcl
-----END PGP SIGNATURE-----

View File

@ -1,15 +0,0 @@
#!/usr/bin/env bash
# This file is for me to get the necressary chmods so anyone can't see my files and Oidentd spoofing and apache UserDir work :)
echo "Chmodding home and everything in it..."
chmod 700 $HOME -R ## Makes only you able read and write and execute (it might not be good having execution permission with all folders and files, but it's required for moving to directories) files in your home directory and directories in it.
echo "Touching oidentd config..."
touch ~/.oidentd.conf ## Creates .oidentd.conf if you don't have it already.
echo "chmodding .oidentd.conf ..."
chmod 644 ~/.oidentd.conf ## Allows you to read and write and everyone to read .oidentd.conf
echo "chmodding home directory..."
touch ~/.ICEauthority ## Creates one important file which is required by graphical login.
chmod 711 ~ ## Allows you to write, read and execute everything in your home directory and makes them searchable.
echo "Creating apache2 UserDir..."
mkdir ~/public_html/
echo "Chmodding apache2 UserDir..."
chmod 755 ~/public_html/ -R ## Allows everyone to read and execute things in your public HTTP folder.

1
misc/chmod.sh Symbolic link
View File

@ -0,0 +1 @@
chmod

View File

@ -1,23 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Public key: http://mkaysi.github.com/PGP/0x82A46728.txt
Comment: gpg --fetch-keys http://mkaysi.github.com/PGP/0x82A46728.txt
Comment: Fingerprint = 24BC 1573 B8EE D666 D10A AA65 4DB5 3CFE 82A4 6728
Comment: Why do I (clear)sign emails? http://git.io/6FLzWg
Comment: Please remove PGP lines in replies. http://git.io/nvHrDg
Comment: Charset of this message should be UTF-8.
iQIcBAABCgAGBQJQMKOxAAoJEE21PP6CpGcogz4P/1GAq2niLBY+8u7vQQfRVgg/
2De3XgAnvI7eFzUZjlECvvlJPkHoiKfOwdycxxhj/FEkX7rpghRy11klHIybotVb
G5hOa5SchbqXLrRobSMaYUAsNb1pWQSXq8aiwOA4aUWcdeF2nTbTdsFs4mPBluTV
8ZV1g7nXa94ZTL1alkSCAI68F0f9YWnJL5EtCLQFPbZp+uULQjPCd7mBA8VvpCcI
URtFeG/xMM4LxgOt+6PylpquQ6iWebLf/tgVWKN5CrOo8JnnDCv34pGDEO6Pl1ty
Eqk+H7/irJEXTK1tyyRfTVmqjY5kfpdPoA+XqFw4VJA0h2EY4923H65m5VtxRyuj
5bmfSKA7gipm5Y3ll9Nc2oNjMif/CBngZeCtTKmYeXXw5MY4wKh+JiCyWUUwwnGk
NkP7QR4QjCgGvoYxe1E/AksWpvz/pZSnnPiMEhkuPQ5QZyZvQcNptXPSLuGPpQo+
1UnizUw8gw12PFzkk1TWc36jcFSKw0ZdxZkz3uO5cleCPHQJ0/9ekjbauL9z5b89
d9P9xS38Os7kMR+j9MQOMg85MFV2C7pxVNdjEbBR8Ek9D4iwci+yz1U9wywMHWi7
hrb3iP29qShx31olCIMafQqVRKgqL3pVkOZA3y40QZjXJd2qiLFAZ6k4P8bqgpGv
QxuA5+0sFQBkUJYL7Kgr
=Wqat
-----END PGP SIGNATURE-----

1
misc/chmod.sh.asc Symbolic link
View File

@ -0,0 +1 @@
chmod.asc