Operating System - HP-UX
1753797 Members
7843 Online
108805 Solutions
New Discussion юеВ

How to find the files that are world writeable in system.

 
SOLVED
Go to solution
Narendra Uttekar
Regular Advisor

How to find the files that are world writeable in system.

Hi,
Is there any script or command to find the files which are world writeable in HP UX 11.11 v1 system? That will give me directory path, owner, group and permission of the files.
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor
Solution

Re: How to find the files that are world writeable in system.

HI:

# find /path -perm -o+w -exec ls -ld {} +

...will find all files and directories in '/path' that are world-writeable and do a long-listing of them to show their ownership, permissions, name, etc.

If you want to restrict this only to files (and not directories), do:

# find /path -type f -perm -o+w -exec ls -ld {} +

If you want to examine the root directory, but not visit mountpoints (like '/usr' and '/var'), use the '-xdev' switch:

# find / -xdev -type f -perm -o+w -exec ls -ld {} +

Regards!

...JRF...



Kranti Mahmud
Honored Contributor

Re: How to find the files that are world writeable in system.

Narendra Uttekar
Regular Advisor

Re: How to find the files that are world writeable in system.

Hi thanks for the solution.