Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
xml
permissions.xml 0.2 kB 1 25-Oct-2018 04:31 Ben Spink
xml
user.xml 0.2 kB 1 25-Oct-2018 04:31 Ben Spink
xml
vfs_items.xml 0.3 kB 1 25-Oct-2018 04:31 Ben Spink

This page (revision-31) was last changed on 13-Aug-2020 17:59 by Ada Csaba

This page was created on 25-Oct-2018 04:31 by Ben Spink

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 1 added 52 lines
(File Transfer API can be found here: [APIFileTransfer].)
!!!Admin API Tool: (as of CrushFTP v8.1)\\
First launch the command line tool passing it the arguments as an admin username and password (CrushTunnel.jar is located in your WebInterface folder):\\
{{{
java -jar CrushTunnel.jar https://crushamdin:password@yourserver.com/
}}}
Now you can issue the user command to add a user, assign a VFS.\\
{{{
user user_add MainUsers user3 password=password
user vfs_add MainUsers user3 path=/home/ privs=(read)(write)(resume)(delete)(view) url=file://home/ name=home
user vfs_delete MainUsers user3 path=/home/ name=home
user user_delete MainUsers user3
}}}
Where:
"path" is the FTP style path to the folder, relative to the user's virtual root, "/". If it's single VFS , then path is to be "/" indeed, otherwise we'll create a Virtual root item, read only, the true VFS will be added below.
"privs" the user VFS folder permissions, can be any combination of (read)(write)(view)(delete)(deletedir)(makedir)(rename)(resume)(share)(slideshow)(invisible)(ratio)
(replicate)(locked) , for details see our user VFS related docs page.
"url" the true URL pointing to the folder itself.
You can also assign groups, and inheritance:\\
{{{
user group_add MainUsers user3 groupname
user inheritance_add MainUsers user3 groupname
}}}
Or remove a user from a group or inheritance:\\
{{{
user group_delete MainUsers user3 groupname
user inheritance_delete MainUsers user3 groupname
}}}
You can use the user API call in CrushTunnel.jar to set the field: allowed_protocols to configure Port restrictions
{{{
ftp:0,ftps:0,sftp:0,http:0,https:0,webdav:0,
}}}
That is the default, but if you only wanted to allow sftp and https, you could do:
sftp:0,https:0,
Its also possible to tell the server to run a Job if you want to remote control jobs:\\
{{{
job remote MyFindJob
}}}
\\
\\
\\
!!!Alternative methods using raw CURL commands:\\
At line 59 added one line
\\
At line 61 added 12 lines
!Registering CrushFTP service from command line.
----
Uses a command to register the CrushFTP license key in case you need to deploy on multiple machines E3 specific, and need to automate the registration.
The spaces and special characters need to be URL encoded
{{{
curl -d command=registerCrushFTP -d registration_name=MY%2520NAME -d registration_email=MYNAME%2540MYEMAIL.COM.EXAMPLE -d registration_code=my_reg_code -u crushadmin:'password' http://127.0.0.1:8080/
}}}
''(long line, so get it all)''
\\
----
At line 94 added one line
Updating a user with certain properties, the missing/updated xml keys can be supplied in line, below example sets the password as the literal "thisismypass"
At line 96 added 6 lines
{{{
curl -d command=setUserItem -d data_action=update -d xmlItem=user -d serverGroup=MainUsers -d username=curl_user --data-urlencode 'user=<?xml+version="1.0"+encoding="UTF-8"?>+<user+type="properties"><password>thisismypass</password></user>' http://crushadmin:pass@127.0.0.1:8080/
}}}
''(long line, so get it all)''
\\
\\
At line 49 changed one line
curl -d command=setUserItem -d xmlItem=groups -d data_action=add -d group_name=MyGroup -d usernames=user1;user2 -u crushadmin:pass http://127.0.0.1:8080/
curl -d command=setUserItem -d xmlItem=groups -d serverGroup=MainUsers -d data_action=add -d group_name=MyGroup -d usernames="user1;user2" -u crushadmin:pass http://127.0.0.1:8080/
At line 123 added one line
''(long line, so get it all)''\\
At line 54 changed one line
curl -d command=setUserItem -d xmlItem=groups -d data_action=delete -d group_name=MyGroup -d usernames=user1;user2 -u crushadmin:pass http://127.0.0.1:8080/
curl -d command=setUserItem -d xmlItem=groups -d serverGroup=MainUsers -d data_action=delete -d group_name=MyGroup -d usernames="user1;user2" -u crushadmin:pass http://127.0.0.1:8080/
At line 129 added one line
''(long line, so get it all)''\\
At line 59 changed one line
curl -d command=setUserItem -d xmlItem=groups -d data_action=delete -d group_name=MyGroup -u crushadmin:pass http://127.0.0.1:8080/
curl -d command=setUserItem -d xmlItem=groups -d serverGroup=MainUsers -d data_action=delete -d group_name=MyGroup -u crushadmin:pass http://127.0.0.1:8080/
At line 135 added one line
''(long line, so get it all)''\\
At line 64 changed one line
curl -d command=setUserItem -d xmlItem=inheritance -d data_action=add -d inheritance_name=AdmminTemplate -d usernames=user1;user2 -u crushadmin:pass http://127.0.0.1:8080/
curl -d command=setUserItem -d xmlItem=inheritance -d serverGroup=MainUsers -d data_action=add -d inheritance_name=AdminTemplate -d usernames="user1;user2" -u crushadmin:pass http://127.0.0.1:8080/
At line 141 added one line
''(long line, so get it all)''\\
At line 69 changed one line
curl -d command=setUserItem -d xmlItem=inheritance -d data_action=delete-d inheritance_name=AdmminTemplate -d usernames=user1;user2 -u crushadmin:pass http://127.0.0.1:8080/
curl -d command=setUserItem -d xmlItem=inheritance -d serverGroup=MainUsers -d data_action=delete -d inheritance_name=AdminTemplate -d usernames="user1;user2" -u crushadmin:pass http://127.0.0.1:8080/
At line 147 added one line
''(long line, so get it all)''\\
At line 74 changed one line
curl -d command=setUserItem -d xmlItem=inheritance -d data_action=delete-d inheritance_name=AdmminTemplate -u crushadmin:pass http://127.0.0.1:8080/
curl -d command=setUserItem -d xmlItem=inheritance -d serverGroup=MainUsers -d data_action=delete -d inheritance_name=AdminTemplate -u crushadmin:pass http://127.0.0.1:8080/
At line 153 added 7 lines
''(long line, so get it all)''\\
Run a remote job on the server:\\
{{{
curl -d command=testJobSchedule -d scheduleName=MyFindJob -d async=false -d response_type=all -d myparam1=happy -u crushadmin:pass http://127.0.0.1:8080/
}}}
''(long line, so get it all)''\\
Version Date Modified Size Author Changes ... Change note
31 13-Aug-2020 17:59 7.429 kB Ada Csaba to previous
30 15-Feb-2019 07:32 7.288 kB Ben Spink to previous | to last
29 13-Nov-2018 13:09 7.254 kB Ada Csaba to previous | to last
28 13-Nov-2018 13:06 6.999 kB Ada Csaba to previous | to last
27 25-Oct-2018 04:31 6.765 kB Ada Csaba to previous | to last
26 25-Oct-2018 04:31 6.759 kB Ada Csaba to previous | to last
25 25-Oct-2018 04:31 6.485 kB Halmágyi Árpád to previous | to last
24 25-Oct-2018 04:31 6.48 kB Halmágyi Árpád to previous | to last
23 25-Oct-2018 04:31 5.956 kB Ben Spink to previous | to last
22 25-Oct-2018 04:31 5.948 kB Ben Spink to previous | to last
21 25-Oct-2018 04:31 5.801 kB Ada Csaba to previous | to last
« This page (revision-31) was last changed on 13-Aug-2020 17:59 by Ada Csaba
G’day (anonymous guest)
CrushFTP9 | What's New

Referenced by
LeftMenu

JSPWiki