Learn about Centmin Mod LEMP Stack today
Become a Member

Chown root or nginx?

Discussion in 'System Administration' started by pamamolf, Sep 19, 2014.

Tags:
  1. pamamolf

    pamamolf Premium Member Premium Member

    3,361
    318
    83
    May 31, 2014
    Ratings:
    +598
    Local Time:
    5:09 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Hi

    After installing Centminmod i upload some files and they auto get permissions as root as i do not have any other users created on system.....

    Is it better to chown them to nginx/nginx ?

    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    40,661
    9,034
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,908
    Local Time:
    12:09 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    • Like Like x 1
  3. pamamolf

    pamamolf Premium Member Premium Member

    3,361
    318
    83
    May 31, 2014
    Ratings:
    +598
    Local Time:
    5:09 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Great thanks but what problems can i have if i use the folders and files with root permissions?

    Even if a user get access from web application he will not be able to edit any file without root permissions ....
     
    style="display:inline-block;min-width:400px;max-width:970px;width:95%;height:90px" data-ad-client="ca-pub-6669518204467592" data-ad-slot="4024536743" data-ad-format="auto">
  4. eva2000

    eva2000 Administrator Staff Member

    40,661
    9,034
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,908
    Local Time:
    12:09 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Yeah you can leave them root if you want but PHP-FPM won't be able to modify, alter or move them if the web app you uses requires to. e.g. wordpress add/remove/update plugins or update wordpress core itself.
     
    • Like Like x 1