def METHOD_NAME(domainName, userName, password, path, owner, api = None):
    try:
        ## need to get gid and uid
        try:
            website = ChildDomains.objects.get(domain=domainName)
            externalApp = website.master.externalApp
        except:
            website = Websites.objects.get(domain=domainName)
            externalApp = website.externalApp
        uid = pwd.getpwnam(externalApp).pw_uid
        gid = grp.getgrnam(externalApp).gr_gid
        ## gid , uid ends
        path = path.lstrip("/")
        if path != 'None':
            path = "/home/" + domainName + "/" + path
            ## Security Check
            if path.find("..") > -1:
                raise BaseException("Specified path must be inside virtual host home!")
            result = FTPUtilities.ftpFunctions(path, externalApp)
            if result[0] == 1:
                pass
            else:
                raise BaseException(result[1])
        else:
            path = "/home/" + domainName
        if os.path.islink(path):
            print("0, %s file is symlinked." % (path))
            return 0
        ProcessUtilities.decideDistro()
        if ProcessUtilities.ubuntu22Check == 1:
            from crypt import crypt, METHOD_SHA512
            FTPPass = crypt(password, METHOD_SHA512)
        else:
            hash = hashlib.md5()
            hash.update(password.encode('utf-8'))
            FTPPass = hash.hexdigest()
        admin = Administrator.objects.get(userName=owner)
        if api == '0':
            userName = admin.userName + "_" + userName
        if website.package.ftpAccounts == 0:
            user = Users(domain=website, user=userName, password=FTPPass, uid=uid, gid=gid,
                         dir=path,
                         quotasize=website.package.diskSpace,
                         status="1",
                         ulbandwidth=500000,
                         dlbandwidth=500000,
                         date=datetime.now())
            user.save()
        elif website.users_set.all().count() < website.package.ftpAccounts:
            user = Users(domain=website, user=userName, password=FTPPass, uid=uid, gid=gid,
                         dir=path, quotasize=website.package.diskSpace,
                         status="1",
                         ulbandwidth=500000,
                         dlbandwidth=500000,
                         date=datetime.now())
            user.save()
        else:
            raise BaseException("Exceeded maximum amount of FTP accounts allowed for the package.")
        print("1,None")
        return 1,'None'
    except BaseException as msg:
        logging.CyberCPLogFileWriter.writeToFile(str(msg) + " [submitFTPCreation]")
        print("0,"+str(msg))
        return 0, str(msg)