Welcome to Centmin Mod Community
Register Now

Nginx Best way to set up site permission for non-root access

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by SneakyDave, Sep 30, 2014.

Tags:
  1. SneakyDave

    SneakyDave Member

    84
    14
    8
    Jul 24, 2014
    Ratings:
    +22
    Local Time:
    1:42 AM
    1.0.15
    I think the suggestion in the Getting Started Guide, is to use the root user to upload files to the nginx site(s), which is pretty easy to do.


    The web site's files are owned by nginx:nginx, and I was wondering what the best way was to have an alternate, non-root, user have write access a site's public directory.

    In the past, I would probably just give the nginx group write permissions to the site's directory, and add the alternate user to the nginx group. Is that the best way, or is there a better way with centminmod?
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,110
    12,179
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,739
    Local Time:
    5:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yeah nginx already has write permissions to the domain's site directories, so all you need is to add an alternate user to the nginx group. Just note that there is currently no per domain/site isolation, so that alternate user does have access to all sites created via Centmin Mod menu option 2 and not just the single domain. Jailed chrooted user accounts/domains features aren't full ready yet Previews - Jailed / chrooted SFTP & SSH user Nginx vhost menu | Centmin Mod Community