Tuesday, April 28, 2015

CentOS 7 tmp directories

Found out yesterday.... CentOS 7 uses private tmp (TEMPORARY) directories.
Good Luck....


https://kukunotes.wordpress.com/2014/11/09/centos-7-systemd-temp-files/


http://fedoraproject.org/wiki/Features/ServicesPrivateTmp


“PrivateTmp” I wont argue if this is a good feature or not. And do not tell me i have to check change logs etc… basically i should be comfortable with a linux system whenever i use it either its 2000 or 2014.
One last tip files under /tmp/ will be removed if related service is stopped and/or restarted. So you can not store your log files under /tmp/ anymore.
Also during this time (5 days on centos 7) system crashed 1 time pretty interestingly but that story is for some other time

Monday, April 27, 2015

smrsh sendmail redirect to script error 255


I was trying to pipe emails into a script via a .forward command and I was getting this error... DSN: unknown mailer error 255.  I found this was due to my php script not knowing the interpreter


tail -f /var/log/maillog

Apr 27 07:16:40 dev-upload sendmail[6062]: t3RCGePd006062: from=apache, size=76029, class=0, nrcpts=1, msgid=<201504271216.t3RCGePd006062@upload.mydomain.dev>, relay=apache@localhost
Apr 27 07:16:40 dev-upload sendmail[6063]: t3RCGeX7006063: from=<apache@upload.mydomain.dev>, size=76264, class=0, nrcpts=1, msgid=<201504271216.t3RCGePd006062@upload.mydomain.dev>, proto=ESMTP, daemon=MTA, relay=upload.mydomain.dev [127.0.0.1]
Apr 27 07:16:40 dev-upload sendmail[6062]: t3RCGePd006062: to=uploader@upload.mydomain.dev, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=106029, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (t3RCGeX7006063 Message accepted for delivery)
Apr 27 07:16:41 dev-upload sendmail[6064]: t3RCGeX7006063: to="| /home/uploader/wrapper.sh", ctladdr=<uploader@upload.mydomain.dev> (1000/1000), delay=00:00:01, xdelay=00:00:01, mailer=prog, pri=106500, dsn=5.3.0, stat=unknown mailer error 255
Apr 27 07:16:41 dev-upload sendmail[6064]: t3RCGeX7006063: t3RCGfX7006064: DSN: unknown mailer error 255
Apr 27 07:16:41 dev-upload sendmail[6064]: t3RCGfX7006064: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=107524, dsn=2.0.0, stat=Sent

so I created a symlink to have interpreter available in another location....
ln -s /usr/bin/php /usr/local/bin/php