Comments on: How to Find Files With SUID and SGID Permissions in Linux https://www.tecmint.com/how-to-find-files-with-suid-and-sgid-permissions-in-linux/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Thu, 13 Jul 2023 14:00:33 +0000 hourly 1 By: Tomas Raulickis https://www.tecmint.com/how-to-find-files-with-suid-and-sgid-permissions-in-linux/comment-page-1/#comment-1403089 Mon, 21 Dec 2020 17:48:47 +0000 https://www.tecmint.com/?p=26604#comment-1403089 In reply to ROMSAT.

This is incorrect too. From “man find”:

-perm +mode

This is no longer supported (and has been deprecated since 2005).

Use -perm /mode instead.

The correct answer is :

To find files with SUID, SGID and StickyBit set in Linux.

$ sudo find / -type f -perm -7000 

To find directories with SUID, SGID and StickyBit set in Linux.

$ sudo find / -type d -perm -7000
]]>
By: Tomas Raulickis https://www.tecmint.com/how-to-find-files-with-suid-and-sgid-permissions-in-linux/comment-page-1/#comment-1402865 Sun, 20 Dec 2020 16:58:42 +0000 https://www.tecmint.com/?p=26604#comment-1402865 The command to find files that have both SUID and SGID set would be with minus sign like so:

$ find . -perm -6000

and not with a slash sign like you recommend.

$ find . -perm /6000
]]>
By: Aaron Kili https://www.tecmint.com/how-to-find-files-with-suid-and-sgid-permissions-in-linux/comment-page-1/#comment-956818 Tue, 02 Jan 2018 05:48:39 +0000 https://www.tecmint.com/?p=26604#comment-956818 In reply to ROMSAT.

@ROMSTAT

Many thanks for sharing this.

]]>
By: ROMSAT https://www.tecmint.com/how-to-find-files-with-suid-and-sgid-permissions-in-linux/comment-page-1/#comment-956459 Mon, 01 Jan 2018 10:53:03 +0000 https://www.tecmint.com/?p=26604#comment-956459 Find files with SUID, SGID and StickyBit set in Linux.

$ sudo find / -perm +7000 -type f

Find directories with SUID, SGID and StickyBit set in Linux.

$ sudo find / -perm +7000 -type d     
]]>