You could also check the checksum of the files. This gives a unique number associated with the file and its contents. If the contents change but the size, permissions and mod time stay the same, the checksum will change.
Code:
# cd /tmp
# echo "this file is ok" > file
# cksum file
3592584977 16 file
# echo "the file is new" > file
# cksum file
3405287892 16 file
I am starting an audit of unix security within our company and am looking for any information that may assist me with this. I am looking for any tips or pointers that I should be aware of when looking at unix. I am very new to unix so any help will do. Maybe there is someone out the that has had... (3 Replies)
Hello,
What does the following mean in terms of file permissions.
-rw-rwSrw- 1 owner group 999 May 25 2004 file_name
What does the "S" stand for.
Thanks in advance for your input. :) (3 Replies)
I work for a big company and all the people within my unit share a common drive to save documents to. I am listed in the group(AMS group) that has access rights to folders within this drive. but i'm trying to restrict access to a confidential folder so that only I can access it.
when I set the... (0 Replies)
Hello,
If you are interested in security, check out this new directory of unix and linux related software tools.
Security - Links
If you have any of your favorite tools, feel free to add them to the directory. (0 Replies)
Introduction
I have seen some misinformation regarding Unix file permissions. I will try to set the record straight. Take a look at this example of some output from ls:
$ ls -ld /usr/bin /usr/bin/cat
drwxrwxr-x 3 root bin 8704 Sep 23 2004 /usr/bin
-r-xr-xr-x 1 bin bin ... (6 Replies)
Hi Team,
I want to set permissions to one folder in such a way that the user can write files or create folder inside that but should not able to delete it.
Basically reason behind this is i am using Pidgin Messenger. There is a directory of logs in which, when user chat its store his logs.... (2 Replies)
Discussion started by: paragnehete
2 Replies
LEARN ABOUT OSF1
privileged
privileged(9r)privileged(9r)NAME
privileged - General: Checks for proper privileges
SYNOPSIS
int privileged(
int privilege,
int error_code );
ARGUMENTS
Specifies the privilege to check against. This privilege must be one of the constants defined in /usr/sys/include/sys/security.h. For exam-
ple, you would specify SEC_FILESYS for disk drivers that must manipulate partition tables on disk drives. Specifies the value used to con-
trol auditing. You can pass one of the system's error codes or one of the following values: -1, 0, 1. An example of an error code is the
constant EPERM.
DESCRIPTION
The privileged routine checks for an appropriate privilege when the security feature is enabled. Use privileged with a privilege number
and with the error_code argument set to the constant EPERM to emulate the traditional behavior of the suser routine. Set error_code to a
value of 0 (zero) if you want to check the privilege but not fail the operation if the user does not have the proper privilege. A value of
-1 turns off all auditing as well.
RETURN VALUES
The privileged routine returns the value 0 (zero) if the process does not have privilege. It returns the value 1 if the process does have
privilege.
FILES SEE ALSO
Routines: suser(9r)privileged(9r)