ftp中使用具有用户定义权限的多个文件夹创建具有多个文件夹的多个

ftp中使用具有用户定义权限的多个文件夹创建具有多个文件夹的多个

本文介绍了如何在Azure容器实例上托管的sftp中使用具有用户定义权限的多个文件夹创建具有多个文件夹的多个用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为多个用户部署atmoz sftp映像.我是这项技术的新手.

以下是我尝试过的要点.

  • 我从GitHub上获取了模板并将其部署在azure上,借助模板,我可以创建两个用户(users1和users2).

  • 对于users1,我已经创建了folder1,对于user2,它已经创建了Folder2,并且在登录sftp时可以看到相同的结构.

  • 对于这两个文件夹,我创建了不同的文件共享.

我现在的要求是向两个用户都显示两个文件夹,但要具有用户定义的权限. users1应该具有对Folder1的写许可权,并且具有对Folder2的读许可权,而user2应该具有对Folder2的写许可权,并且仅具有对Folder1的读许可权.

第一个用户(即user1)的SFTP登录

解决方案

当前,当您装载Azure文件共享时,Azure容器实例不支持更改权限.您会看到所有用户的home路径均由root用户和root组拥有:

然后在容器实例内执行命令mount时,您将看到如下内容:

file_modedir_mode都设置了权限0777.而且没有属性可以更改ARM模板中的安装选项.因此,恐怕您无法实现自己的目标.

I'm trying to deploy atmoz sftp images for multiple users. I am new to this technology.

Below are the points I have tried.

  • I took the template from GitHub and deployed it on azure and with the help of the template I'm able to create the two users(users1 and users2).

  • For users1 I have created the folder1 and for user2 folder2 and I'm able to see the same structure while login into sftp.

  • For both the folders I have created the different file share.

My requirement is now to show both the folders to both the users but with user defined permission. users1 should have write permission on folder1 and read permission on folder2 and user2 should have write permission on folder2 and only read permission on folder1.

SFTP login for first user i.e user1

解决方案

Currently, the Azure Container Instance does not support to change the permission when you mount the Azure File Share. And you can see all the users home path are owned by the root user and the root group:

And when you execute the command mount inside the container instance, you can see it like this:

Both file_mode and the dir_mode are set with the permission 0777. And there is no property to change the mount options in the ARM template. So I'm afraid you cannot achieve your purpose.

这篇关于如何在Azure容器实例上托管的sftp中使用具有用户定义权限的多个文件夹创建具有多个文件夹的多个用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 22:30