Want more timely Centmin Mod News Updates?
Become a Member

Change owner permissions from root to nginx

Discussion in 'System Administration' started by pamamolf, Jul 17, 2014.

Tags:
  1. pamamolf

    pamamolf Premium Member Premium Member

    3,352
    318
    83
    May 31, 2014
    Ratings:
    +593
    Local Time:
    6:10 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Hi

    How can i change the permissions from root to nginx using ssh?

    I know that i can do it on a folder using:

    Code:
    chown -R nginx:nginx public
    But how can i include all folders and subfolders and all files in the public?

    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    40,633
    9,019
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,887
    Local Time:
    1:10 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    the -R command makes it recursive so every directory and file within public gets the chown applied :)
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    3,352
    318
    83
    May 31, 2014
    Ratings:
    +593
    Local Time:
    6:10 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    I am asking as i found on the net this command:

    Code:
    chown -R nginx:nginx *
     
    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,633
    9,019
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,887
    Local Time:
    1:10 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    that command would apply to everything within the current directory and all sub directories and files within current directory

    see http://linuxmanpages.com/man1/chown.1.php

     
    • Like Like x 1