Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check crontab entry permission

Status
Not open for further replies.

Mag0007

MIS
Feb 15, 2005
829
US
I am trying to check if the entries/scripts in crontab have other permission to write (chmod 750).

I can get the scripts easily by:
crontab -l | awk {'print $6'}

But how do I check the permissions of them?

TIA
 
A starting point:
find `crontab -l | awk '!/^#/{print $6}'` -follow ! -perm 750

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV: thanks!

what does the "!" do in -follow ! perm 750?

I want to find files in that list which do NOT have 750 permission.

 
man find

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
It negates the -perm value, ie finds any where the permissions aren't 750.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top