An ossftp client can access the ossftp server by using an AccessKey or a custom logon user, both of which require permissions to access the target bucket. This topic explains how to create custom logon users on the ossftp server.
Prerequisites
ossftp is installed. For more information, see Install ossftp.
Procedure
-
Log on to the server where ossftp is installed.
-
Switch to the installation directory of ossftp.
-
Modify the accounts section in the config.json file.
Example configuration:
{ "modules":{ "accounts":[ { // Specify the AccessKey ID and AccessKey Secret that have permissions on the bucket. "access_id":"yourAccessKeyID", "access_secret":"yourAccessKeySecret", // Specify the name of the target bucket. "bucket_name":"examplebucket", // Optional. Restricts user access to this path. If left empty, the user can access the entire bucket. "home_dir":"examplefolder/", // Specify a custom logon password. "login_password":"password1", // Specify a custom logon username. "login_username":"user1" }, { // Specify the AccessKey ID and AccessKey Secret that have permissions on the bucket. "access_id":"yourAccessKeyID", "access_secret":"yourAccessKeySecret", // Specify the name of the target bucket. "bucket_name":"examplebucket", // Optional. Restricts user access to this path. If left empty, the user can access the entire bucket. "home_dir":"", // Specify a custom logon password. "login_password":"password2", // Specify a custom logon username. "login_username":"user2" } ], "launcher":{ "auto_start":0, "control_port":8192, "language":"cn", "popup_webui":1, "show_systray":1 }, "ossftp":{ "address":"127.0.0.1", "bucket_endpoints":"", "log_level":"INFO", "passive_ports_start":51000, "passive_ports_end":53000, "port":2048 } } } -
Restart the ossftp service to apply the changes.
-
In a browser, access the ossftp web UI.
Device
Endpoint
Local machine
http://127.0.0.1:8192Other machine
http://<IP address of the Linux server>:8192 -
On the ossftp web UI, click Restart.
ImportantDo not click Exit. This stops the ossftp service.
-