Discover Centmin Mod today
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.

  1. SneakyDave

    SneakyDave Member

    Jul 24, 2014
    Local Time:
    1:12 PM
    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

    May 24, 2014
    Brisbane, Australia
    Local Time:
    4:12 AM
    Nginx 1.25.x
    MariaDB 10.x
    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