#!/bin/bash
####### Celeste CrystalFaery's POSIXware README executable text #######
echo $0 is the README file for Celeste CrystalFaery POSIX software
echo This is version: 2016-10-18 21:08:57+00:00
echo -n View it with [L]ess, [M]ore, or edit it with [V]im?:
read preference
case $preference in
l) less $0;;
m) more $0;;
v) vi $0;;
*) echo Everything is just a file, thanks to sshfs.;;
esac
exit $?
####### Celeste CrystalFaery's POSIXware README - PREFACE #######
http://crystalfaeries.net/posix/readme.txt
is the most convenient web-visible URL for this file,
which is multiply linked to guide readers/users of:
/usr/local/{,bin,etc,src{,/txt},games}/readme.txt
#######################################################################################
####### #######
####### Local Conventions/{As,Pre}sumptions Which Affect Porting This Software #######
####### #######
#######################################################################################
The presumed standard is a DebIan {,based} Linux(TM) System,
having either apt{-get,} and/or aptitude available and
with appropriate .deb repositories configured.
If your POSIX is BSD based (e.g. MacOSuX), or an RPM based Linux(TM) system,
then some of your files go into different locations in the filesystem,
and where these scripts may attempt to use apt-get or aptitude to auto-install software,
you will have to manually equate, or alter the scripts to use yum or rpm,
or whatever the MacOSuX equivalent is.
It is desirable to evolve the scripts here to become more POSIX compliant over time,
so please contribute patches or bug reports to mailto:celeste@crystalfaeries.net
The presumed use case is that the user has admin abilities (i.e. can sudo) and that
therefore there is the ability to intrude upon various parts of the filesystem :-)
We assume /usr/local/* /home/* /var/www /usr/share and others, which,
if they are unwriteable for the user on the target system, will require editing the scripts.
Alternatively, make them writeable for this (admin capable) user:
# DO NOT RUN THESE COMANDS AS-IS WITHOUT UNDERSTANDTING THE IMPLICATIONS,
# AS DEPENDING UPON INSTALLATION THIS MAY BREAK THINGS or they may not even exist:
> sudo mkdir -p /usr/share/upc /usr/local/{,bin,etc,src{,/txt},games}
> sudo chmod g+w -R /usr/share/upc /usr/local/{,bin,etc,src{,/txt},games}
> sudo chgrp -R `whoami` /usr/share/upc /usr/local/{,bin,etc,src{,/txt},games}
# I just presumed each user has their own group by the same name, true of many *NIX installations.
________________ ____________________________
# Executables We work system-wide:
$HOME/bin symlink to /usr/local/bin/
ln -s /usr/local/bin/
Some installers install for the individual versus system wide,
or if you want your own unique executables:
rm $HOME/bin;mkdir $HOME/bin
# Executable Scripts We manually move binaries to /usr/local/games from /usr/local/bin
/usr/local/bin/ Local Executable Scripts, e.g. shell (.sh), Python (.py), Perl (.pl),
and supporting documentation (.txt, .html, ...) should all be editable in vim.
If we need a hex editor for it, it gets moved to /usr/local/games
If we need to compile it, it installs into /usr/local/games and lives in /usr/local/src
# BEWARE! /usr/local/bin must be secured since it normally comes first in shell paths.
# Non-Script Software not installed via the DebIan package management system
/usr/local/src/ Local Source Code (and documentation) for installations in /usr/local/games/
/usr/local/games/ Local Executables (directories or .elf, ...)
# Windows Executables Policy is to install in system location for all users to avoid duplication
/usr/local/games/exe/ or /opt/exe/ (some contents are hardlinks to other files inside /usr/local/games/subdirs)
Local "Windows" Executables (.exe, .com, to be executed by WINE)
$HOME/.wine/drive_c/local symlink to /usr/local/games/exe/
# Apache WebServer CGIs:
# non-DebIan Packaged software is manually enforced (for security) to be unwriteable and not under /var/www
# DebIan Packaged software is left unmodified (other than enforcing this symlink):
/var/www/cgi-bin symlink to /usr/lib/cgi-bin
# NOTE: most apache internal configurations specify the cgi-bin directory and will not actually use this symlink
# NOTE: /usr/local/bin/synchronize/syncbin clones /usr/lib/cgi-bin to /usr/local/bin which is usually first in PATH,
# therefore beware security implications of any Common Gateway Interface executables you install here affects entire system.
# BEWARE! /etc/darkey must be secured or the contents of your backups are exposed, and
# is exposed on the command line during actual darchive operations.
# It is possible to schedule hours of non-login for regular users.
# -r-------- 1 root root 12 2010-05-18 14:05 /etc/darkey
# BEWARE! /etc/mysqlkey must be secured or the contents of your databases are exposed,
# and is exposed on the command line during actual backup-mysql operations.
# It is possible to have scheduled hours of non-login for regular users.
# -r-------- 1 root root 12 2010-05-18 14:05 /etc/mysqlkey
# Note that the following distinction depends upon a case sensitive file system :-)
# Yes, MacOSuX users, you *do* have an option to install a case sensitive file system.
# But it is not the factory default!
$HOME/txt Text documents of any kind, however, only rarely not ending in .txt
$HOME/documents A mount point for a network fileserver :-)
/home/downloads A mount point for a network fileserver for shared downloads of all users
#########################################################################################################################
Linux(TM) File System Hierarchy version 2.0
/bin/ Essential Binaries
/boot/ Static Files of Boot Loader
/dev/ Essential Devices (contains MakeDev)
/etc/ Host Specific System Configuration
/etc/opt/ Configuration Files for Add-On Applications
/etc/x11/ X-Window Configuration Files
/home/ User Home Directories
/lib/ Library and Kernel Modules
/media/ CD/DVD/Hot-Pluggable Partition Mount Points
/mnt/ Temporary FileSystem MountPoint
/opt/ Add-On Application Software
/proc/ Process (pseudo-)FileSystem
/root/ Home Directory of ROOT User
/sbin/ System Binaries
/srv/ Server Data
/tmp/ Available for Programs (IS cleared on BOOT) Temporary Data Files
/usr/ Multi-User Shared and Read-Only Data
/usr/bin/ Most User Commands
/usr/include/ Standard Include Files for C Programs
/usr/lib/ .bin,.lib,.obj Files for Programming and Packages
/usr/local/ Local Softwares
/usr/man/ Manual Pages
/usr/sbin/ Non-Essential Binaries
/usr/share/ Architecture Independent Shared Data
/var/ Variable Data Files
/var/cache/ Application Cache Data
/var/lib/ Variable State Information Remains After ReBoot
/var/log/ Log Files
/var/lock/ Lock Files for Shared Resources
/var/opt/ Variable Data of Packages Installed
/var/run/ Info of System Since it was Booted
/var/spool/ Data Awaiting Processing
/var/spool/lpd/ Berkeley Line Printer Daemon Spool
/var/spool/mail/ SMTP Mail Spool
/var/spool/mqueue/ Mqueue Spool
/var/spool/news/ NNTP Spool
/var/spool/rwho/ Rwho Spool
/var/spool/uucp/ Unix-to-Unix Copy Program Spool
/var/tmp/ Available for Programs (NOT cleared on BOOT)
/var/yp/ Data for NIS Services
syntax highlighted by Code2HTML, v. 0.9.1