04-18-2002
Yes...there are a three individuals that will have access to this server. Which is exactly the reason that i would like to perform this alteration. I guess i'm just a very cautious individual. people can do things( however un-intentional)...that can really screw it up. I've done it myself.
As for the chmod command, I already know how to use it. Which is shown by the fact that i changed the previous dir to 644. I have already reduced the services down to an minimum.
I have utilized the Deception Toolkit. Set various cron jobs to check system file integrity, password strength, /tmp directory alterations, alteration of number of SUID/SGID files, fingerprint of OS ports, etc......
I don't think that i really need to change anything else then the permissions to keep authenticated users from making a devastating mistake to my system.
I have been allowing some good friends...check out the Linux OS. My contribution to the advocation of all the *nix OS'.
Last edited by thomas.jones; 04-18-2002 at 10:31 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi
i have a script
compareFiles()
{
find /tmp/Satya -type f | \
while read filename1
do
echo "----------------------------------------$filename1"
find /tmp/Satya -type f | \
while read filename2
do
if diff $filename1 $filename2
then
echo "Both files... (3 Replies)
Discussion started by: Satyak
3 Replies
2. Shell Programming and Scripting
Hello all:
I need found script to save and restore file permissions and owner:group... this is for backup my server...
I have one problem in my server and file permissions and owner:group, mess up..
For this reason i need found one way to secure this aspect of the server...
Thanks! (1 Reply)
Discussion started by: joangopan
1 Replies
3. Shell Programming and Scripting
Hi, I am fairly new to writing scripts.
I am trying to write a script that moves either One or All of the files from one directory to another.
I know how to make the actual command to do it, but i don't quite know how to add operators to it, ie -i or -a.
I want -i to move one file from... (4 Replies)
Discussion started by: SirJoeh
4 Replies
4. UNIX for Dummies Questions & Answers
Hey all,
i want to copy only the file names from an ftp server (directory and all sub directory) to a text file in another server (non ftp), i.e. i want to recursively move through directories and copy only the names to a text file.
any help is appreciated...thank you in advance (1 Reply)
Discussion started by: deking
1 Replies
5. UNIX for Dummies Questions & Answers
Hello All,
I am application admin. I need to clear all the temporary files cleared by the applications. I need help/suggestion that is there any way to create a file system such that every Dir created in by any user will have 775 permissions. So, that i can simply clear the temporary file which... (6 Replies)
Discussion started by: firestar
6 Replies
6. Shell Programming and Scripting
Hi All,
I have a script which will be run by another user say user 2 which will create a new dir say dir 4 in my work place and copy certains files from his dir.
/t1/t2/t3/dir4
I want to allow the user to create the dir dir4 and copy the files,but bring the control back to my name say user... (2 Replies)
Discussion started by: prasperl
2 Replies
7. UNIX for Dummies Questions & Answers
I am very new to unix as well as shell scripting.
I have to write a script for the following requirement. In have to list all the files in directory and its sub directories along with file path and size of the file
Please help me in this regard and many thanks in advance. (3 Replies)
Discussion started by: nmakkena
3 Replies
8. Shell Programming and Scripting
Hello all;
I have a question based on a ticket I have from a user... K...first some background...this client needed a generic user setup to allow them to ftp files; user is called "msifpt"...so here's what they want to do now with this account:
1. Client will use the user id ‘msiftp'... (1 Reply)
Discussion started by: gvolpini
1 Replies
9. Shell Programming and Scripting
Hi Guys ,
I want create files Dire and Sub Dire. as same time using variable.
EX:
x1="/hk/Pt/put/NC/R1.txt"
x2="/hk/pt/Put/Ot/NC/RN.txt"
And i want delete all after done with my script.
Thanks (2 Replies)
Discussion started by: pareshkp
2 Replies
10. Shell Programming and Scripting
hello,
I have a question regarding the below script.. I just simply trying to write to a file in directory that does not have write permissions but this is failing .. it still writes to it regardless ..
Many thanks in advance..
#!/bin/bash
#check if dir exists, if so write to it
... (5 Replies)
Discussion started by: Reb0rn
5 Replies
CHMOD(1) FSF CHMOD(1)
NAME
chmod - change file access permissions
SYNOPSIS
chmod [OPTION]... MODE[,MODE]... FILE...
chmod [OPTION]... OCTAL-MODE FILE...
chmod [OPTION]... --reference=RFILE FILE...
DESCRIPTION
This manual page documents the GNU version of chmod. chmod changes the permissions of each given file according to mode, which can be
either a symbolic representation of changes to make, or an octal number representing the bit pattern for the new permissions.
The format of a symbolic mode is `[ugoa...][[+-=][rwxXstugo...]...][,...]'. Multiple symbolic operations can be given, separated by com-
mas.
A combination of the letters `ugoa' controls which users' access to the file will be changed: the user who owns it (u), other users in the
file's group (g), other users not in the file's group (o), or all users (a). If none of these are given, the effect is as if `a' were
given, but bits that are set in the umask are not affected.
The operator `+' causes the permissions selected to be added to the existing permissions of each file; `-' causes them to be removed; and
`=' causes them to be the only permissions that the file has.
The letters `rwxXstugo' select the new permissions for the affected users: read (r), write (w), execute (or access for directories) (x),
execute only if the file is a directory or already has execute permission for some user (X), set user or group ID on execution (s), sticky
(t), the permissions granted to the user who owns the file (u), the permissions granted to other users who are members of the file's group
(g), and the permissions granted to users that are in neither of the two preceding categories (o).
A numeric mode is from one to four octal digits (0-7), derived by adding up the bits with values 4, 2, and 1. Any omitted digits are
assumed to be leading zeros. The first digit selects the set user ID (4) and set group ID (2) and sticky (1) attributes. The second digit
selects permissions for the user who owns the file: read (4), write (2), and execute (1); the third selects permissions for other users in
the file's group, with the same values; and the fourth for other users not in the file's group, with the same values.
chmod never changes the permissions of symbolic links; the chmod system call cannot change their permissions. This is not a problem since
the permissions of symbolic links are never used. However, for each symbolic link listed on the command line, chmod changes the permis-
sions of the pointed-to file. In contrast, chmod ignores symbolic links encountered during recursive directory traversals.
STICKY FILES
On older Unix systems, the sticky bit caused executable files to be hoarded in swap space. This feature is not useful on modern VM sys-
tems, and the Linux kernel ignores the sticky bit on files. Other kernels may use the sticky bit on files for system-defined purposes. On
some systems, only the superuser can set the sticky bit on files.
STICKY DIRECTORIES
When the sticky bit is set on a directory, files in that directory may be unlinked or renamed only by root or their owner. Without the
sticky bit, anyone able to write to the directory can delete or rename files. The sticky bit is commonly found on directories, such as
/tmp, that are world-writable.
OPTIONS
Change the mode of each FILE to MODE.
-c, --changes
like verbose but report only when a change is made
-f, --silent, --quiet
suppress most error messages
-v, --verbose
output a diagnostic for every file processed
--reference=RFILE
use RFILE's mode instead of MODE values
-R, --recursive
change files and directories recursively
--help display this help and exit
--version
output version information and exit
Each MODE is one or more of the letters ugoa, one of the symbols +-= and one or more of the letters rwxXstugo.
AUTHOR
Written by David MacKenzie.
REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>.
COPYRIGHT
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
SEE ALSO
The full documentation for chmod is maintained as a Texinfo manual. If the info and chmod programs are properly installed at your site,
the command
info chmod
should give you access to the complete manual.
chmod (coreutils) 4.5.3 February 2003 CHMOD(1)