php - sed can't edit ssl.conf "Permission denied" -


i'm trying edit /etc/httpd/conf.d/ssl.conf bash file called php exec:

 #comment lines in ssl.conf     sed -i 's/^sslcertificatefile/#sslcertificatefile/g' /etc/httpd/conf.d/ssl.conf     sed -i 's/^sslcertificatekeyfile/#sslcertificatekeyfile/g' /etc/httpd/conf.d/ssl.conf   #uncomment lines in ssl.conf      sed -i 's/^#sslcertificatefile/sslcertificatefile/g' /etc/httpd/conf.d/ssl.conf      sed -i 's/^#sslcertificatekeyfile/sslcertificatekeyfile/g' /etc/httpd/conf.d/ssl.conf 

but i'm getting error :

   sed: couldn't open temporary file /etc/httpd/conf.d/sed3nribg: permission denied    sed: couldn't open temporary file /etc/httpd/conf.d/sed2asgeg: permission denied 

i changed owner apache , permission a+xw of ssl.conf file didn't .
idea ?

sed tries create temp file... see errors... , has no permission write directory ( /etc/httpd/conf.d )

see sed command creates randomly named files possible other solutions


Comments

Popular posts from this blog

design - Custom Styling Qt Quick Controls -

Unable to remove the www from url on https using .htaccess -