Permission with the linux server using apache and php

by YongC
3 replies
  • WEB DESIGN
  • |
I have setup an linux CentOS 7 server to run php and i using apache, but when all done php can't write file even i have set chmod 777 and i have chown apache at the owner of the directory.

If the file exist, i can write the data on it, but if file don't exist i can create it, it notice me don't have permission (folder is chmod 777).

Thanks for your help !
#apache #linux #permission #php #server
  • Profile picture of the author Sandakelum
    Originally Posted by YongC View Post

    I have setup an linux CentOS 7 server to run php and i using apache, but when all done php can't write file even i have set chmod 777 and i have chown apache at the owner of the directory.

    If the file exist, i can write the data on it, but if file don't exist i can create it, it notice me don't have permission (folder is chmod 777).

    Thanks for your help !
    I think you should grant permissions to www-data, don't know much about CentOS, but that the user on Ubuntu systems.

    BTW I use this to setup my server,
    https://tjosm.com/3801/setting-virtu...l-panel-nginx/
    {{ DiscussionBoard.errors[10822334].message }}
    • Profile picture of the author YongC
      Originally Posted by Sandakelum View Post

      I think you should grant permissions to www-data, don't know much about CentOS, but that the user on Ubuntu systems.

      BTW I use this to setup my server,
      https://tjosm.com/3801/setting-virtu...l-panel-nginx/
      I'm using apache and user and group is apache not www-data
      {{ DiscussionBoard.errors[10823802].message }}
      • Profile picture of the author BSTEF
        Originally Posted by YongC View Post

        I'm using apache and user and group is apache not www-data
        apache2's www folder should be at /var/www, try setting that to 777 and see if it works. Btw, how did you install apache/php? if you installed it normally using yum, it should work out of the box
        Signature
        CORVUS OCULUM CORVI NON ERUIT
        {{ DiscussionBoard.errors[10826813].message }}

Trending Topics