Learn about Centmin Mod LEMP Stack today
Become a Member

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

    68
    11
    8
    Jul 24, 2014
    Ratings:
    +16
    Local Time:
    12:24 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

    30,161
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    3:24 PM
    Nginx 1.13.x
    MariaDB 5.5
    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
     
    • Like Like x 1