Results 11 to 14 of 14
Boogy took the lead. SUID/SGUID bits was what I would've suggested as well....
- 06-22-2009 #11
Boogy took the lead. SUID/SGUID bits was what I would've suggested as well.
- 06-23-2009 #12
can you give me an example using a sciptname how to set it
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 06-23-2009 #13
Look at this : hxxx://softpanorama.ORG/Tools/Find/finding_suid_and_sguid_files.shtml
- 06-23-2009 #14
What is a chmod command?
Chmod command sets UNIX file permissions. First you need to telnet or SSH to the target computer, then in the command prompt you need to execute a chmod command. Also you can set the permissions with the help of other programs, such as FTP client.
2. Syntax and examples of the shell chmod command (telnet or SSH)
Syntax of the chmod command is the following:
The word "chmod" should be entered all in lowercase letters. Options can be:Code:prompt> chmod [options] permissions file[s]
Permissions could be one of the following:* -R, set permissions recursively
* -f, "forced" or silent mode
* -v, "verbose", show information for every file processed
* -c, show information only if changes are made to the file
File[s] can be either* Octal numeric format, with a leading zero like "0644"
* Octal numeric format, without a leading zero like "644"
* Text form like "a+r", "u=rwx" or "o-w", you can use several comma separated text form permissions
What text permissions values mean:* relative path to the file like "file.pl"
* absolute path to the file like "/var/spool/mail/paul"
* several space separated files like "file.pl /var/spool/mail/paul"
* file name mask like "*.html" or "*"
u Sets permissions for the owner of the file, e.g.: "u+w" allows the owner to write to the file
g Sets permissions for the group (to which owner belongs), e.g. "g-x" suppresses the execution of the file by the group
o Sets permissions for other users (that are not in group), e.g.: "o=r" allows others only to read the file
a Sets permissions for all (owner, group and others), e.g.: "a-w" disables write access to the file for everyone
= Assigns the permissions, e.g. "a=rw", sets read and write permissions and disables execution for all
- Removes certain thing[s] from the permissions, keeping all other (not involved) permissions. E.g. "a-x" disables execution of the file for everyone, this example doesn't touch read and write permissions.
+ Adds certain thing[s] to the permissions, keeping all other (not involved) permissions. E.g. "a+x" allows execution of the file for everyone, this example doesn't touch read and write permissions.
r Sets read permissions
w Sets write permissions
x Sets execute permissions
t Sets sticky bit, e.g. "o+t" sets sticky bit for a file
s Sets SUID or SGID. E.g.: "u+s" sets SUID, "g+s" sets SGID.
2.1. Examples
Here are the examples of the chmod command. All commands do the same thing, except that the first four set SUID & SGID and sticky bits to zero and the last two don't touch SUID & SGID and sticky bits:
This example performs recursive chmod for the directory:Code:prompt> chmod 0755 script.sh prompt> chmod 755 script.sh prompt> chmod u=rwx,g=rx,o=rx script.sh prompt> chmod u=rwx,go=rx script.sh prompt> chmod u+rwx,g+rx,g-w,o+rx,o-w script.sh prompt> chmod u+rwx,go+rx,go-w script.sh
Code:prompt> chmod -R 755 mydirectory


Reply With Quote