78.3k views
4 votes
You want to find all files on your server that have either the SGID or SUID permission set. Which command should you use to obtain a list of these files?

1 Answer

4 votes

Answer:

For SGID you type this

$ find . -perm /4000

For SUID you type this

$ find . -perm /2000

Step-by-step explanation:

Auxiliary file permissions, that are commonly referred to as “special permissions” in Linux are needed in order to easily find files which have SUID (Setuid) and SGID (Setgid) set.

After typing

$ find directory -perm /permissions

Then type the commands in the attachment below to obtain a list of these files with SGID and SUID.

You want to find all files on your server that have either the SGID or SUID permission-example-1
User Erdinc Ay
by
4.2k points