You can use the AccessKey pair that is granted the access permissions on the bucket to access the ossftp server from the ossftp client. You can also use a custom logon user that is granted the access permissions on the bucket to access the ossftp server. This topic describes how to create a custom logon user to access the ossftp server from the ossftp client.
Prerequisites
ossftp is installed. For more information, see Installation.Procedure
- Log on to a server on which ossftp is installed.
- Switch to the installation directory of ossftp.
- Modify the accounts parameter in config.json. Sample configurations:
{ "modules":{ "accounts":[ { // Specify the AccessKey secret and the AccessKey ID that are granted the permissions to access the required bucket. "access_id":"LTAI4FrfJPUSoKm4JH******", "access_secret":"Y6IoUOZReouXvWaXuwjvDch9******", // Specify the name of the destination bucket. "bucket_name":"examplebucket", // Specify the URLs of the objects in the bucket. After you specify the preceding information, you can use the account to access the objects whose URLs you specified. If you do not specify the URLs of the objects, you can use the account to access all objects in the bucket. "home_dir":"examplefolder/", // Specify a password for logons. "login_password":"password1", // Specify a username for logons. "login_username":"user1" }, { // Specify the AccessKey secret and the AccessKey ID that are granted the permissions to access the required bucket. "access_id":"LTAI4FrfJPUSoKm4JH******", "access_secret":"Y6IoUOZReouXvWaXuwjvDch9******", // Specify the name of the destination bucket. "bucket_name":"examplebucket", // Specify the URLs of the objects in the bucket. After you specify the preceding information, you can use the account to access the objects whose URLs you specified. If you do not specify the URLs of the objects, you can use the account to access all objects in the bucket. "home_dir":"", // Specify a password for logons. "login_password":"password2", // Specify a username for logons. "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 for the configurations to take effect.