Configure ftp yocto

Discussion in 'Yocto' started by modjo, Jun 10, 2017.

  1. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    Hi all, i'm trying to configure a ftp server for my cards but i have some issues ... For that i add pure-ftpd to my local.conf. Then, i also created a user for this ftp with with recipe :

    Code:
    SUMMARY = "add user cam"
    DESCRIPTION = "This recipe add user cam for ftp access"
    
    PR = "r0"
    
    LICENSE = "MIT"
    LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
    
    SRC_URI = "file://test.txt"
    
    S = "${WORKDIR}"
    
    inherit useradd
    
    USERADD_PACKAGES = "${PN}"
    
    USERADD_PARAM_${PN} = "-u 1200 --home /home/cam/ftpCam --create-home -r -s /bin/bash cam"
    
    GROUPADD_PARAM_${PN} = "-g 880 ftpcam"
    
    do_install() {
             install -d -m 755 ${D}/home/cam/ftpCam
             install -p -m 644 test.txt ${D}/home/cam/ftpCam
            
             # The new users and groups are created before the do_install
                 # step, so you are now free to make use of them:
                
             chown -R cam:ftpcam ${D}/home/cam
    }
    
    FILES_${PN} = "/home/cam/ftpCam/*"
    
    # Prevents do_package failures with:
    # debugsources.list: No such file or directory:
    
    INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
    This work, the user with this home directory is created. Now i'm trying to access to FTP server with another pc (with filezilla) and i have this error during the identification :

    I also tried to follow this tutorial
    but no more success. Normally there is a conf file in /etc/pure-ftpd/conf/ but not in yocto ? Do you know how i can resolve this please ?
     
  2. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    I make some "little" progress, instead of use pure-ftpd i use proftpd. Now there is a file configuration in /etc that i can change. Now i have access in anonymous login but yet some issues to use another user (root ...)
     

Share This Page