2016-05-16 87 views
0

我跟所有创建subuser步骤上subuser.org给出加入火狐图像的subuser

我不能够创造Firefox的形象,不能限制访问下载文件夹中的影像时和文档

请给我提供解决方案。我需要为我的项目

+0

提供创建子用户和添加Firefox的链接 – piyushj

+0

https://github.com/subuser-security/subuser –

+0

https://www.youtube.com/watch?v=KZrs8KngN68 –

回答

0

您可以创建一个文件夹,我的-subuser图像,然后创建中的第一个第二个文件夹的Firefox:

我-subuser图像/火狐

在火狐文件夹,您需要创建另一个子文件夹:搬运工图像

一旦你这样做,你需要创建两个文件:

permissions.json 

而且

docker-image/SubuserImagefile 

您的文件布局应该像一个在subuser默认存储库

在permissions.json文件中找到,你告诉subuser什么Firefox是允许这样做:

{"description":"A popular web browser." 
,"maintainer":"student" 
,"executable":"/usr/bin/firefox" 
,"gui":{"clipboard":true} 
,"sound-card":true 
,"allow-network-access":true 
,"basic-common-permissions":true} 

下面是我刚刚设置的权限的概述:

"gui": Allows Firefox to display windows to X11 securely using the XPRA X11 bridge 
"sound-card": Allows Firefox to communicate with your sound card 
"allow-network-access": Allows Firefox to access the network 
"basic-common-permissions": Allows Firefox to do some basic things like save settings to it's own specially contained home directory, see the LOCAL and timezone ect. 

但它并不允许Firef以访问它自己的子用户之外的任何文件。例如,如果您愿意,您可以添加一个user-dirs权限以允许其访问Downloads目录。

一旦你创建了一个permissions.json文件,你可以继续创建一个SubuserImagefile。

泊坞窗图像/ SubuserImagefile应该看起来就像一个Dockerfile:

从Ubuntu的 RUN apt-get update && apt-get upgrade -y && apt-get install -yq firefox

现在你完成设置您的subuser图像。

您可以通过运行创建一个Firefox subuser:

$ subuser subuser add firefox [email protected]/home/student/my-subuser-images 

您可以通过运行运行火狐subuser:

$ subuser run firefox 

您可以创建一个以上的火狐subuser。如果您想拥有多个Facebook帐户或Google帐户,并且无需一直注销,则此功能非常有用。如果您希望在进行网上银行业务时降低跨站点脚本风险,这也很有用。

subuser subuser添加网上银行的Firefox @ /家庭/学生/我-subuser图像

您可以用命令

subuser运行网上银行

运行网上银行subuser您可以通过访问〜/ .subuser/homes来访问子用户的主目录。

您可以与他人共享您的子用户图像,以减少每个人的沙盒应用程序的负担。如果你想分享你的Firefox的形象,你可以cd到我的-subuser图像并打开该文件夹变成一个Git仓库:

$ cd ~/my-subuser-images 
$ git init 
$ git add . 
$ git commit -m "Add Firefox image" 

如果再按这个混帐回购协议的地方,然后其他人可以安装Firefox的形象easilly用命令:

$ subuser subuser添加的Firefox火狐@http://example.com/student/my-subuser-images.git

他们会运行subuser以同样的方式,就好像它们在本地完成设置。

+0

我们试过这个。 firefox确实打开..但是当我在permission.Json中提到user-dirs:[“Downloads”]时,它并不限制访问唯一的下载文件夹,如下面的视频所示.. https://www.youtube。 com/watch?v = KZrs8KngN68 –

+0

因此,问题的第一部分是解决?现在您只需要限制访问“下载”文件夹? – piyushj

+0

是的。您有任何解决方案来做到这一点吗? –