Changes is adding a user through a script

Please post here if you have problems in using Wing FTP Server.

Changes is adding a user through a script

Postby mellul » Tue Jun 22, 2010 7:25 am

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
mellul
 
posts 77
 
joined Mon Nov 16, 2009 2:00 pm

Re: Changes is adding a user through a script

Postby FTP » Tue Jun 22, 2010 7:43 am

No, you needn't make any change.
FTP
Site Admin
 
posts 1232
 
joined Tue Sep 29, 2009 6:09 am

Re: Changes is adding a user through a script

Postby mellul » Wed Jul 21, 2010 11:52 am

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?
mellul
 
posts 77
 
joined Mon Nov 16, 2009 2:00 pm

Re: Changes is adding a user through a script

Postby FTP » Wed Jul 21, 2010 1:18 pm

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.
FTP
Site Admin
 
posts 1232
 
joined Tue Sep 29, 2009 6:09 am

Re: Changes is adding a user through a script

Postby mellul » Thu Jul 22, 2010 10:38 am

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
mellul
 
posts 77
 
joined Mon Nov 16, 2009 2:00 pm

Re: Changes is adding a user through a script

Postby FTP » Thu Jul 22, 2010 10:51 am

Yes, you are right! they are after parameter "nMaxUploadSpeedPerUser".
FTP
Site Admin
 
posts 1232
 
joined Tue Sep 29, 2009 6:09 am

Re: Changes is adding a user through a script

Postby mellul » Tue Oct 12, 2010 1:56 am

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
mellul
 
posts 77
 
joined Mon Nov 16, 2009 2:00 pm

Re: Changes is adding a user through a script

Postby FTP » Tue Oct 12, 2010 3:16 pm

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}).
FTP
Site Admin
 
posts 1232
 
joined Tue Sep 29, 2009 6:09 am

Re: Changes is adding a user through a script

Postby mellul » Wed Oct 13, 2010 8:02 am

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
mellul
 
posts 77
 
joined Mon Nov 16, 2009 2:00 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests