Changes is adding a user through a script

Please post here if you have problems in using Wing FTP Server.
Post Reply
mellul
Posts: 77
Joined: Mon Nov 16, 2009 2:00 pm

Changes is adding a user through a script

Post by mellul »

Hi,

I have been researching the latest couple of upgrades and I have noticed that you added a place where you can specify the minimum amount of characters in a password.

I have a number of scripts running that adds users and changes user details remotely. Would I have to change my script in anyway to cater for this new addition?

Thanks
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: Changes is adding a user through a script

Post by FTP »

No, you needn't make any change.
mellul
Posts: 77
Joined: Mon Nov 16, 2009 2:00 pm

Re: Changes is adding a user through a script

Post by mellul »

I have just tested the newly released FTP and it looks like my script for adding a user does not work any more. Can you please advise what I need to change before this version goes on our live servers?
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: Changes is adding a user through a script

Post by FTP »

Lua API "c_AddUser" just added two parameters(nil value will be accepted):

[49]string SSH Public Key Path
[50]table Subfolder access rules, its structure looks like parameter 32.


and modified parameter 32:

[32]table a table list of user directories (user directory also is a table, its structure is formated as
{m_strDir,m_strAlias,m_bIsHomeDir,m_bFileRead,m_bFileWrite,m_bFileAppend,m_bFileDelete,m_bDirectoryList,m_bDirectoryMake,m_bDirectoryDelete,m_bDirectoryRename,m_bFileRename,m_bZipFile,m_bUnzipFile}).



I think old lua script can work fine, if you still can't solve your problem, please paste your code.
mellul
Posts: 77
Joined: Mon Nov 16, 2009 2:00 pm

Re: Changes is adding a user through a script

Post by mellul »

That helped alot thanks. I also had a small mistake in the code which I fixed.

Just one small detail I would like to point out. I do not know if maybe I am not seeing the change in the documentation but I cannot seem to find where to place:
[49]string SSH Public Key Path
[50]table Subfolder access rules, its structure looks like parameter 32
in the c_AddUser(...).

I am assuming it should be after int nMaxUploadSpeedPerUser. Am I right?

Thanks again for your help
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: Changes is adding a user through a script

Post by FTP »

Yes, you are right! they are after parameter "nMaxUploadSpeedPerUser".
mellul
Posts: 77
Joined: Mon Nov 16, 2009 2:00 pm

Re: Changes is adding a user through a script

Post by mellul »

Hi,

I do not know if it is a problem in my script or a general problem (I have just upgraded to 3.6.6) but when I add a user using a script I built, the unzip permission is not being ticked. The Zip permission is being ticked fine.

Can you please have a look while I go through my script again?

Thanks in advance
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: Changes is adding a user through a script

Post by FTP »

The parameter 32 of function "c_AddUser" changed:


[32]table a table list of user directories (user directory also is a table, its structure is formated as

{m_strDir,m_strAlias,m_bIsHomeDir,m_bFileRead,m_bFileWrite,m_bFileAppend,m_bFileDelete,m_bDirectoryList,m_bDirectoryMake,m_bDirectoryDelete,m_bDirectoryRename,m_bFileRename,m_bZipFile,m_bUnzipFile}).
mellul
Posts: 77
Joined: Mon Nov 16, 2009 2:00 pm

Re: Changes is adding a user through a script

Post by mellul »

Thanks for your help. I have solved the problem.

Just one small point - In the documentation it looks like that particular part in the script no longer needs strDomain and strUsername when this is not the case. My script did not work without them.

Thanks again
Post Reply