我遵循了在subuser.org上给出的创建子用户的所有步骤
我无法创建firefox图像,也无法限制对视频和文档中给出的下载文件夹的访问
请给我提供解决方案。我的项目需要它
发布于 2016-05-16 13:54:43
您将创建一个文件夹my-subuser-images,然后在第一个文件夹中创建第二个文件夹firefox:
my-subuser-images/firefox
在firefox文件夹中,您需要创建另一个子文件夹: docker-image
完成后,您需要创建两个文件:
permissions.json和
docker-image/SubuserImagefile您的文件布局应该类似于subuser-default-repository中的布局
在permissions.json文件中,告诉子用户允许火狐做什么:
{"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.然而,它不允许Firefox访问它自己的子用户之外的任何文件。例如,如果您愿意,您可以添加一个user-dirs权限,以允许它访问下载目录。
一旦创建了permissions.json文件,您就可以继续创建SubuserImagefile。
docker-image/SubuserImagefile应该看起来像Dockerfile:
从ubuntu运行apt-get update && apt-get upgrade -y && apt-get install -yq firefox
现在,您已经完成了子用户映像的设置。
您可以通过运行以下命令创建Firefox子用户:
$ subuser subuser add firefox firefox@/home/student/my-subuser-images您可以通过运行以下命令来运行Firefox子用户:
$ subuser run firefox您可以创建多个Firefox子用户。如果您希望拥有多个Facebook帐户或Google帐户,并且不需要一直注销/登录,这将非常有用。如果你想在网上银行时减少跨站点脚本的风险,它也是很有用的。
子用户subuser添加网上银行firefox@/home/student/my- subuser -images
您可以使用以下命令运行您的网上银行子用户
子用户运行网上银行
您可以通过访问~/.subuser/ home来访问子用户的主目录。
您可以与其他人分享您的子用户图像,以减轻每个人的沙箱应用程序的负担。如果你想分享你的Firefox镜像,你可以cd到my-subuser-images,然后把这个文件夹变成一个git仓库:
$ cd ~/my-subuser-images
$ git init
$ git add .
$ git commit -m "Add Firefox image"如果您随后将此git代码库推送到某个地方,则其他人可以使用以下命令轻松安装您的Firefox镜像:
$ subuser子用户添加firefox firefox@http://example.com/student/my-subuser-images.git
他们将以相同的方式运行该子用户,就好像他们在本地完成了设置一样。
https://stackoverflow.com/questions/37246799
复制相似问题