2013-08-28 2 views
1

는 내가 PHP exec에서 호출 bash는 파일과 /etc/httpd/conf.d/ssl.conf 편집하기 위해 노력하고있어 "권한이 거부"ssl.conf를 편집 할 수 없습니다 나오지도

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 

내가 ssl.conf 파일의 a+xwapache 허가에 소유자를 변경하지만 도움이되지 않았다 :이 오류를 받고 있어요.
어떤 아이디어가 있습니까?

답변

0

내가 별도의 소유자 변경에 전체 폴더 호스트를 넣어 :

chown apache:apache /etc/https/conf.d 
chown apache:apache /etc/https/conf.d/* 

을하고 떠들썩한 파티에서 그 라인 :

#comment those lines in vhosts.conf 
    sed -i 's/^SSLCertificateFile/#SSLCertificateFile/g' /etc/httpd/conf.d/vhosts.conf 
    sed -i 's/^SSLCertificateKeyFile/#SSLCertificateKeyFile/g' /etc/httpd/conf.d/vhosts.conf 

    #uncomment those lines in vhosts.conf 
    sed -i 's/^#SSLCertificateFile/SSLCertificateFile/g' /etc/httpd/conf.d/vhosts.conf 
    sed -i 's/^#SSLCertificateKeyFile/SSLCertificateKeyFile/g' /etc/httpd/conf.d/vhosts.conf 
0

나오지 시도는 ... 오류를 볼 수 ... 임시 파일을 생성하고

가능한 다른에 대한 sed command creates randomly named files를 참조 디렉토리에 기록 할 수있는 권한 (/etc/httpd/conf.d)가 없습니다 솔루션