1830517 Members
2896 Online
110006 Solutions
New Discussion

777 Permisions

 
Fuad_1
Regular Advisor

777 Permisions

How we identify files with 777 permisions?

Thanks
Set goals, and work to achieve them
7 REPLIES 7
MarkSyder
Honored Contributor

Re: 777 Permisions

ll|grep rwxrwxrwx

If you want to check more than one directory you will have to use find.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Dennis Handly
Acclaimed Contributor

Re: 777 Permisions

find path-to-search -perm a=rwx
Steven E. Protter
Exalted Contributor

Re: 777 Permisions

Shalom,

http://www.hpux.ws/?p=12

There is a system setup guide link on that page that provides the needed commands and other useful and related information.

Bill Hassell wrote the doc.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Doug O'Leary
Honored Contributor

Re: 777 Permisions

Hey;

Well, certainly can't beat Bill Hassell, but here's my favorite:

find ${path} -xdev -perm -0777 -print

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Isgleas
Occasional Advisor

Re: 777 Permisions

If strictly looking for "files" with "777" perms, then:

find ${path} -type f -perm 777 -exec ll \+

Bill Hassell
Honored Contributor

Re: 777 Permisions

While you are at it, look for files with 666 permissions too. 777 is almost always wrong for files since it sets the execute bit on files that are never to be executed. 666 is just as bad because anyone on the system can trash the contents of the file.


Bill Hassell, sysadmin
Suraj K Sankari
Honored Contributor

Re: 777 Permisions

Hi,

If the file or directory is having full 777 permission its looks like this.

777 means rwx for user rwx or owner and rwx for others.
rwx means read write execute

The output would be like this
$ ls -l
-rwxrwxrwx 1 monitor users 282624 Oct 30 08:42 abc
drwxrwxrwx 2 monitor wipro 96 Oct 30 08:43 bbc

here abc is a file and bbc is a directory with 777 permissions

Suraj