7.3.4. Create support files in /etc
Create the file ~/staging/etc/issue using
the example below or design a customized message.
Connected to \l at \b bps.
Note that "\l" is a lowercase letter L, not the number
Use a text editor to create a minimal passwd file conforming to
the Linux Standards Base (LSB) document. Save the file as
Use a text editor to create an LSB conforming group file and
save it as ~/staging/etc/group
7.3.6. Set directory and file permissions
Set minimal privileges on all files and directories under
~/staging. Everything is owned by the root user and
the root group. Permissions are read-write for the owner and read-only
for the group. Exceptions to the blanket permissions are handled case by
bash# cd ~/staging
bash# chown -R 0:0 *
bash# chmod -R 640 *
Set execute permission on all directories. (Note the capital
Files in /bin are read and execute for all,
but su is an exception.
bash# chmod 755 bin/*
bash# chmod 4750 bin/su
Files in /dev have various permissions. Disk
devices should be accessible to administrators only. Other files like
/dev/null should have full privileges granted to
bash# chmod 660 dev/fd0 dev/ram0
bash# chmod 666 dev/null
bash# chmod 622 dev/console
bash# chmod 600 dev/initctl
bash# chmod 622 dev/tty
bash# chmod 622 dev/tty?
The passwd and group
files must be world readable.
bash# chmod 644 etc/passwd
bash# chmod 644 etc/group
The scripts in /etc/init.d are read and
execute for administrators.
bash# chmod 750 etc/init.d/*
Libraries need read and execute permissions for everyone.
Only root should have access to the /root
Make files in /sbin read and execute for
Temp should be read-write for all with the sticky bit set.