Cent OS crontab not executing as apache

Try

Step 1: vi /etc/pam.d/crond

 Step 2: Add below lines

auth    optional        pam_rootok.so

auth    optional        pam_console.so

#auth   include         system-auth

account optional        pam_permit.so

session optional        pam_loginuid.so

Step 3: setenforce 0

Step 4: chmod go+rx  /var/spool/cron/

Hope this works 🙂 , it worked for me when i was trying an EC2 instance on amazon

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s