Start a new topic

Import user by command line read permission not correct set

markus @ Mon Jun 23 10:02:18 EEST 2014
I use the following command to add users to crushftp (default XML User database) :
java -jar CrushFTP.jar -u user02 user02 "/demo/test" read Template "" ""
and the result in the vfs.xml file is


(read)(view)(resume)
read


compared to the correct one, if i use the gui



(read)(view)(resume)
(read)(view)(resume)


If i use the full permission the user rights where set correct.
I use the Crushftp Version 7.0.2 build 230
Maybe i have used a wrong Syntax.

Kind regards
Markus

spinkb @ Mon Jun 23 13:47:14 EEST 2014
The permissions part is the actual permissions.


(read)(write)(delete)(view)(resume)(deletedir)(makedir)(rename).............

Not just "read". Fix that and it will be fine.

Thanks,
Ben
markus @ Tue Jun 24 02:17:09 EEST 2014
Sorry to ask you again Ben, but i don't find my error. The Syntax for the Java -jar crushftp.jar is

-u : (NO GUI) takes 7 additional quoted parameters of [username] [password] [start dir path in slash notation ex:"/my hd/"]
[permissions (either 'full' or 'read'] [templateUser:(all settings from user are copied except VFS. Use "" to skip)] [notes] [email]

So i use on my Centos 6.5

java -jar CrushFTP.jar -u user02 user02 "/demo/test" read Template "" ""

and the result is that i have no permission on the test Folder. As you see in the vfs.xml file for the user02 in my request above.
Regards
markus
spinkb @ Tue Jun 24 06:55:04 EEST 2014
That help message is wrong for "read". Its been fixed in t eh latest 7.0.2_233+ build.

READ_ONLY is what you want to use, or the example I gave you where you use the actual (read)(view)(resume) which means read only.

Thanks,
Ben
markus @ Tue Jun 24 07:01:37 EEST 2014
Wonderful, read_only in the command line solve my problem.
Thank you, regards
Markus
markus @ Tue Jun 24 07:30:15 EEST 2014
Last question Ben, is it possible to add more than one vfs by the command line? Because a "re-run" of the command line will overwrite the vfs entries in the vfs.xml file.
regards
Markus
spinkb @ Tue Jun 24 07:48:58 EEST 2014
No...the command line method like your doing is intended for the basic standard setup, not more complex scenarios.

To do more complex scenarios you could use CURL and replicate the commands the User Manager is issuing to the server.

Thanks,
Ben
markus @ Wed Jun 25 02:38:02 EEST 2014
Hm, not the best answer, because we need to fill in the user and their rights remotely. Might it be better to use mysql as data source? Do you have a documentation about the the required fields and their references between.
Regards
Markus
spinkb @ Wed Jun 25 02:44:06 EEST 2014
You can use SQL, have CrushFTP import your existing users into SQL using the prefs, user config tab. Take a look at the SQL structure and then replicate how its doing things.
Login to post a comment