Want more timely Centmin Mod News Updates?
Become a Member

Sysadmin How to add SSH/FTP user? is it SSH user and FTP user is not same?

Discussion in 'System Administration' started by chorong91, Oct 4, 2016.

  1. chorong91

    chorong91 New Member

    16
    2
    3
    Dec 1, 2015
    Ratings:
    +2
    Local Time:
    10:13 PM
    I just create a vhost domain and get FTP user like information below:
    -------------------------------------------------------------
    FTP hostname : 88.88.88.88
    FTP port : 21
    FTP mode : FTP (explicit SSL)
    FTP Passive (PASV) : ensure is checked/enabled
    FTP username created for test.virtual.com : test01
    FTP password created for test.virtual.com : Testing2016
    -------------------------------------------------------------
    I try to login with FTP client like FileZilla/WinSCP and it works.
    I usually access my SSH on command below :
    ssh root@88.88.88.88
    (then write password then tadaa it works fine.)
    but when I tried with FTP username and password
    ssh test01@88.88.88.88
    or
    ssh test01@test.virtual.com
    it will return "test01@test.virtual.com's password:"
    when I enter the password then it will return :
    "Permission denied, please try again."
    I already make sure the password is right.


    and how can I change the permission if I can access it on ssh?
    So I usually create git hook on root. (so i can make remote git remote add root@88.88.88.88:~/git-repo/test.virtual.com.git) and hook it to public folder of domains.

    and now I need to create git for someone that I can't give root access and password
    So I think I can put git hook on "private" folder or something new folder of domains folder.
    and give him FTP username and password
    so they can access git hook like "test01@test.virtual.com:(its already on domains folder)/private/git/something.git"
    and hook it to "test01@test.virtual.com:(its already on domains folder)/public/"

    The Summary of my question is:
    1. Is it FTP username and SSH username is not same?
    2. If its not same How to create SSH username? And Permission so I can access it like story above :D
    3. If its same why I can't access when I enter right username and password?
    4. Can I make git access like that I tell on last paragraph?
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,348
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    10:13 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Pure-ftpd virtual ftp user outlined at Pure-FTPD Virtual FTP Users - CentminMod.com LEMP Nginx web stack for CentOS is for FTP over TLS only. There's no SSH access for that ftp user. Only root user has ssh access as Centmin Mod isn't made for shared hosting. Any additional SSH users added wouldn't be locked down like what you see in WHM/cpanel.

    FAQ item 2 covers users accounts you can't lock site accounts down to user level like cpanel/WHM as there is no 100% user isolation between site accounts on Centmin Mod.

    Pure-ftpd virtual ftp users only isolates ftp Pure-FTPD Virtual FTP Users but isn't fully jailed like cpanel/WHM as Centmin Mod is not made or setup for shared hosting like cpanel/WHM but more for usage by trusted user (myself/yourself).
     
  3. upgrade81

    upgrade81 Member

    295
    17
    18
    Sep 5, 2016
    CH
    Ratings:
    +30
    Local Time:
    1:13 PM
    1.17
    10.3
    however, is it possible to create an ssh user for exclusive use on php script side and force it to write / read a certain directory?