Get the most out of your Centmin Mod LEMP stack
Become a Member

FTP user for XF dev

Discussion in 'Other Centmin Mod Installed software' started by sepulchre, Nov 28, 2018.

  1. sepulchre

    sepulchre Member

    145
    22
    18
    Dec 22, 2014
    Ratings:
    +26
    Local Time:
    4:11 AM
    Hey,

    I want to give a XF developer ftp access to my server, so he can change/delete/edit files.

    I gave him the ftp user centminmod created automatically but he said it doesn't have the rights edit files.

    So how can I make that ftp user have all rights? Or create a new user with all rights?
     
  2. sepulchre

    sepulchre Member

    145
    22
    18
    Dec 22, 2014
    Ratings:
    +26
    Local Time:
    4:11 AM
    Code:
    pure-pw useradd YOURFTPUSERNAME -u nginx -g nginx -d /home/nginx/domains/YOURDOMAINVHOST
    service pure-ftpd restart
    Doing this and I could add a pureftpd user as it seems but it didn't have write permissions.

    I think doing this below fixed the permissions problems.

    Code:
    chown -R nginx:nginx /home/nginx/domains/newdomain.com/public
    Is this the correct way of doing it?
     
  3. eva2000

    eva2000 Administrator Staff Member

    41,341
    9,278
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,234
    Local Time:
    12:11 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    how was the original xenforo files uploaded ? via pure-ftpd user or via root user SFTP ?

    if via root user SFTP then yes chown is needed to make sure nginx user/group permissions as per step 2 of getting started guide instructions Getting Started Guide - CentminMod.com LEMP Nginx web stack for CentOS
     
    • Like Like x 1
  4. sepulchre

    sepulchre Member

    145
    22
    18
    Dec 22, 2014
    Ratings:
    +26
    Local Time:
    4:11 AM
    They were uploaded via the root user. I always use the root user.

    I thought the automatically created pure-ftpd user, which was created when we installed centmin mod and followed the steps, will have automatically all the correct permissions. But not the case.

    From what I understand, I have to chown always after I did sth. with root user, so other ftp users are able to "write" permissionwise?

    It took me quite a time to find out what was the problem honestly. Like for directories and folders we can do chmod and give permissions and see what permissions are there. But for users I couldn't find a damn one-liner which helps me to give the "write" permission for his directories.

    Anyway, thank you.
     
  5. eva2000

    eva2000 Administrator Staff Member

    41,341
    9,278
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,234
    Local Time:
    12:11 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    pure-ftpd user will upload files owned by correct nginx user/group and your devs won't have issues if files uploaded via pure-ftpd user

    but if you upload files as root user via SFTP, then files are owned by root user/group and pure-ftpd user won't have permissions to manage such uploaded files.
     
    • Like Like x 1