I have a script that normally should reload Postfix, but i got permission denied at /../../reload.pl 11.
And here is my perl script:
#!/usr/bin/perl -w
#
# Script Name : reload postfix
# version : v1.0
#
$ENV{PATH} = '/usr/bin';
print $<." ".$>;
# Relaod postfix (opt)
system('/etc/postfix reload');
The result is :
0 0
Can't exec "/etc/postfix": permission denied at /../../reload.pl 11
The solution is to give the complete path to execute the postfix cmd:
$ENV{PATH} = '/usr/sbin';
You probably mean:
or
/etc/postfixis most likely a config file which isn’t executable, hence the permission denied error. You can find the path topostfixon your system withwhich postfix