ossftp supports two authentication methods: AccessKey pairs and custom login users. This topic describes how to create custom login users on the ossftp server to grant clients access to your Object Storage Service (OSS) buckets.
Prerequisite
ossftp is installed. For instructions, see Install ossftp.
Procedure
Log in to the server where ossftp is installed.
Go to the ossftp installation directory.
Modify the accounts parameter in the config.json file.
Sample configuration:
{ "modules":{ "accounts":[ { // Enter the AccessKey ID and AccessKey Secret that have permissions to access the bucket. "access_id":"yourAccessKeyID", "access_secret":"yourAccessKeySecret", // The name of the target bucket. "bucket_name":"examplebucket", // The access path within the bucket. If specified, the user is restricted to this path. If left empty, the user can access all objects in the bucket. "home_dir":"examplefolder/", // Custom login password. "login_password":"password1", // Custom login username. "login_username":"user1" }, { // Enter the AccessKey ID and AccessKey Secret that have permissions to access the bucket. "access_id":"yourAccessKeyID", "access_secret":"yourAccessKeySecret", // The name of the target bucket. "bucket_name":"examplebucket", // The access path within the bucket. If specified, the user is restricted to this path. If left empty, the user can access all objects in the bucket. "home_dir":"", // Custom login password. "login_password":"password2", // Custom login 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 ossftp to apply the configuration.
Access the ossftp Web UI from a browser.
Location
Access URL
On the local device
http://127.0.0.1:8192From another computer
http://<IP address of the Linux server>:8192In the ossftp Web UI, click Restart.
ImportantDo not click Exit, or ossftp stops running.