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
Changes is adding a user through a script
-
- Site Admin
- Posts: 2083
- Joined: Tue Sep 29, 2009 6:09 am
Re: Changes is adding a user through a script
No, you needn't make any change.
-
- Posts: 77
- Joined: Mon Nov 16, 2009 2:00 pm
Re: Changes is adding a user through a script
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?
-
- Site Admin
- Posts: 2083
- Joined: Tue Sep 29, 2009 6:09 am
Re: Changes is adding a user through a script
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.
[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.
-
- Posts: 77
- Joined: Mon Nov 16, 2009 2:00 pm
Re: Changes is adding a user through a script
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
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
-
- Site Admin
- Posts: 2083
- Joined: Tue Sep 29, 2009 6:09 am
Re: Changes is adding a user through a script
Yes, you are right! they are after parameter "nMaxUploadSpeedPerUser".
-
- Posts: 77
- Joined: Mon Nov 16, 2009 2:00 pm
Re: Changes is adding a user through a script
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
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
-
- Site Admin
- Posts: 2083
- Joined: Tue Sep 29, 2009 6:09 am
Re: Changes is adding a user through a script
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}).
[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}).
-
- Posts: 77
- Joined: Mon Nov 16, 2009 2:00 pm
Re: Changes is adding a user through a script
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
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