Discover Centmin Mod today
Register Now

Security How can i create a user and lock him on public folder?

Discussion in 'System Administration' started by pamamolf, Feb 19, 2021.

  1. pamamolf

    pamamolf Well-Known Member

    4,125
    429
    83
    May 31, 2014
    Ratings:
    +841
    Local Time:
    2:43 PM
    Nginx-1.29.x
    MariaDB 10.6.x
    Hello

    How can i create a user and lock him on public folder on Centminmod?


    Thank you
     
  2. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    9:43 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    As per FAQ item 2, Centmin Mod isn't for shared hosting ;) The official site pure-ftpd page for How to re-create Pure-FTPD user for Vhost? would probably be closest just changing top level directory from
    /home/nginx/domains/domain.com to
    /home/nginx/domains/domain.com/public in theory. Haven't done it myself as never needed to.
     
  3. pamamolf

    pamamolf Well-Known Member

    4,125
    429
    83
    May 31, 2014
    Ratings:
    +841
    Local Time:
    2:43 PM
    Nginx-1.29.x
    MariaDB 10.6.x
    Ok thanks :)

    The problem using pure-ftpd is that is very easy to escape from the domain.com folder and go to upper directories :(
     
  4. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    9:43 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Yeah but it shouldn't be a problem as you shouldn't be doing shared hosting as Centmin Mod isn't made for such and you only can go up to so far. Centmin Mod is made for own usage or by trusted users only.
     
  5. Jon Snow

    Jon Snow Active Member

    917
    188
    43
    Jun 30, 2017
    Ratings:
    +293
    Local Time:
    8:43 AM
    Nginx 1.13.9
    MariaDB 10.1.31
    There have been some really old posts from you about adding jailing in the future. Are those plans cancelled or is it something you're still interested in adding in at some point?
     
  6. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    9:43 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Plans are way way into the future and would need a lot of testing and would be after 123.09beta01 comes out of beta to stable and well that is ever moving goal post which is mainly held up by not enough free time to work on 123.09 stable's documentation and full centminmod.com site redo/update. I only work on Centmin Mod in my spare time as my paid work takes priority :)

    edit: yup been a while since I posted an example of jailed user isolated Centmin Mod proposed method at Previews - Jailed / chrooted SFTP & SSH user Nginx vhost menu