Want to subscribe to topics you're interested in?
Become a Member

'You must give non-root uid and gid' FTP user - Error

Discussion in 'Other Centmin Mod Installed software' started by Fabio19, Apr 13, 2017.

Tags:
  1. Fabio19

    Fabio19 New Member

    5
    1
    3
    Apr 13, 2017
    Ratings:
    +2
    Local Time:
    2:54 PM
    Hi everyone, I'm totally newbe here. I want to create a VPS hosting to host my websites.

    I'm totally newbe with PHP, Mysql, Apache, CentOS ecc...

    I'm just following a step by step guide to configure my vps.

    When i Tried to create a FTP user (to upload landing pages ecc..) the terminal gave me this error "You must give non-root uid and gid" while in the step by step guide there isn't.

    I don't say what to do, anyone can take care of me :) ? I'm using terminal on Mac OS

    The only information I have: my CentOS version 6.8, Stop. I'm totally newbe.


    This is the guide I'm following:

    - Setting Up Master & Individual FTP Accounts For Your Domains -

    Preparation

    1. First you’ll need to connect to SSH on the server. You can do this either via Terminal Console on Linux/MacOS or using an application such as Putty for windows. You can download Putty from here:

    http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe

    After starting the SSH client, look up the server’s main IP address from your hosting control panel. This information is available under the “Remote Access” tab on the “Dashboard” of the Linode you have created, and can also be found on the MyServers page on Vultr. Then type the following into your terminal:

    Code:
    ssh root@youripaddress -- if you are using Linux/MacOS terminal shell
    2. Once you’ve established connection to the server, type in your root password (you’ve set this password during the initial VPS Setup on Linode; you can copy it from the manage page for the server on Vultr). Note that while typing the password into the terminal, you will not see any symbols appearing, but the password is indeed being entered.

    Setting Up a Master FTP Account For Access to All Domains

    1. The first command we need to execute is:

    (IMPORTANT: In the command below, replace “ftpuser” with the username you would like to use. The username should not contain any special characters, and should be 8 characters long maximum. Do not modify anything else except the “ftpuser” portion.)

    Code:
    pure-pw useradd ftpuser -u nginx -g nginx -d /home/nginx/domains/
    (here is where the terminal gave me the error, while in the video tutorial is all ok)

    Type the command above into the console and hit enter. The password prompt will appear and you should type the password for this FTP account twice. Again, the password won’t show up while you’re typing but it is being registered. If you type the password correctly both times you will be back at the shell prompt. If the passwords don’t match you will see “You didn’t enter the same password” and you will be sent back to the password prompt where you’ll need to retype the password.

    2. When you are back at the shell prompt execute:

    Code:
    pure-pw mkdb && service pure-ftpd restart
    This FTP account will provide you with access to all the domains you add to this server using the “Step 2 -- Add a domain vHost/FTP” document. When you login you will see a list of folders each corresponding to a domain/subdomain name you’ve added. The following folder should neither be utilized nor removed as doing so would require additional modifications on some of the configuration files:

    demodomain.com

    When you browse to directories in FTP, the “public” directory is the one you should upload files to, and one you can access by browsing to “http://yourdomain.com” (where yourdomain.com is the domain you added in step 2).
     
  2. eva2000

    eva2000 Administrator Staff Member

    55,230
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,831
    Local Time:
    10:54 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    ignore that guide on Centmin Mod as per https://community.centminmod.com/th...st-give-nonroot-uid-and-gid.10767/#post-46268 you can't setup master ftp account. It's only individual ftp user accounts for pure-ftp virtual ftp user. If you want master right now only way is root user via sftp which is the standard way on Centmin Mod before pure-ftpd virtual ftp users was added Pure-FTPD Virtual FTP Users - CentminMod.com LEMP Nginx web stack for CentOS
     
  3. eva2000

    eva2000 Administrator Staff Member

    55,230
    12,253
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,831
    Local Time:
    10:54 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    technically you could do it though as the error just means needing to pass uid and gid of user = nginx instead of the name though

    to find uid and gid of nginx type
    Code (Text):
    id nginx
    


    but i don't test with such config so use at your own risk