Un client ossftp peut accéder au serveur ossftp à l'aide d'un AccessKey ou d'un utilisateur de connexion personnalisé. Dans les deux cas, des autorisations d'accès au bucket cible sont requises. Cette rubrique explique comment créer des utilisateurs de connexion personnalisés sur le serveur ossftp.
Prérequis
ossftp est installé. Pour plus d'informations, consultez la rubrique Installer ossftp.
Procédure
Connectez-vous au serveur sur lequel ossftp est installé.
Accédez au répertoire d'installation d'ossftp.
-
Modifiez la section accounts du fichier config.json.
Exemple de 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 } } } -
Redémarrez le service ossftp pour appliquer les modifications.
-
Dans un navigateur, accédez à l'interface web d'ossftp.
Device
Endpoint
Local machine
http://127.0.0.1:8192Other machine
http://<IP address of the Linux server>:8192 -
Dans l'interface web d'ossftp, cliquez sur Restart.
ImportantNe cliquez pas sur Exit. Cela arrête le service ossftp.
-