• 首页
  • 狐文
  • 狐图
  • About
狐窝
OvO
  1. 首页
  2. 未分类
  3. 正文

freenas 插件权限设置

2020年09月09日 32点热度 0人点赞 0条评论
2015-02 from--https://www.ixsystems.com/community/threads/how-to-giving-plugins-write-permissions-to-your-data.27273/
In order for your plugin to be able to write to your data datasets/folders it must have..

  1. access to your data dataset/folders
  2. permissions to write to your data folders.


1) MAKING DATA ACCESSIBLE TO YOUR PLUGIN'S JAIL

  • It is preferred that your data reside on a dataset(s) outside of your jail that you regularly snapshot and backup.
  • FreeNAS plugins, by default, have no access to files residing outside of its jail.
  • Data datasets/folders should be mounted into the plugin's jail as described in the FreeNAS User Guide.
    • http://doc.freenas.org/9.3/freenas_jails.html#add-storage

2) PERMISSIONS
Choose one of the 4 solutions to give your plugin write permission to your data folders.

FACTS

  • Every folder/file has a UNIX permission level, UID ownership, and GID ownership, which determines which user/group members can read/write to that folder/file. Basic UNIX permissions are described in the opening part of Chapter 4, Part 4, of the FreeBSD handbook.
    • https://www.freebsd.org/doc/handbook/permissions.html
  • Jails and the FreeNAS host do not share user/group databases. They only associate UIDs/GIDs to users/groups if that mapping exists in it's particular user/group database.
  • Processes running inside a jail's userland (plugins) are permitted to read/write files/folders according to the jail's user/group database.
  • By default, most plugins run as a specific user, with a specific UID, and keep their configuration/databases/logs in what I will refer to as a data-directory.

NOTE

  • Never change the ownership or permission levels of Jail datasets. These contain operating system and application files that will not work properly if changed. Only ever change ownership or permission levels of datasets that contain only your data and that are mounted into your Jail(s).

SOLUTION 1 - USER WRITEABLE

  • Add a user in the FreeNAS WebUI with a matching UID as the plugin's default user.
  • Change ownership of the data dataset/folders to the newly added user.

SOLUTION 2 - USER WRITEABLE

  • In the jail, add a user with a matching UID as the owner of the data dataset/folders.
    • Code:
      pw useradd -n USER -u UID -d /nonexistent -s /usr/sbin/nologin
  • In the jail, change the user the plugin runs as, and change ownership of the data-directory.
    • Code:
      service PLUGIN onestop
      chown -R USER:GROUP /var/db/PLUGIN
      sysrc 'PLUGIN_user=USER'
      service PLUGIN start

SOLUTION 3 - GROUP WRITEABLE

  • Change permission of the data dataset/folders to allow group writing.
  • In the jail, add a group with a matching GID as the group owner of the data dataset/folders.
    • Code:
      pw groupadd -n GROUP -g GID
  • In the jail, add the user the plugin runs as to the newly added group.
    • Code:
      pw groupmod GROUP -m USER

SOLUTION 4 - OTHER WRITEABLE

  • Change permission of the data dataset/folder to allow other writing.
标签: data write your
最后更新:2020年09月09日

OvO

狐狸

点赞
< 上一篇
下一篇 >
最新 热点 随机
最新 热点 随机
钛备份或小米系统备份功能备份出来的APK无法正常还原 BBR安装启用 安装docker mitmproxy 调试方法 Android SDK 版本选择 Perdition Mail代理服务器配置 HAProxy SSL代理 Openssl 中间人SSL代理 Stunnel SSL to SSL代理 NGINX反代IMAP配置 各种设备User Agent Torrent下载工具推荐 用 rar2john+hashcat 破解 RAR 文件密码 2020最好的Linux发行版 关闭新版chrome工具栏上拼图图标 Office 下载、安装、激活,有它就够了! Android 非官方的发行版 openwrt添加autoconf-archive
〖最全〗pycharm+ipython notebook搭建(for mac) 安装和搜索更新很慢,而且在 Windows 7 和 Windows Server 2008 R2 中出现 CPU 使用率过高 MyBatis3 用log4j在控制台输出 SQL CentOS 7 中firewall-cmd命令 ubuntu10.04等官方原版如何添加Back Track 5等其它ubuntu衍生版的源 删除Maven仓库无用的版本 GeoIP.dat.gz和GeoLiteCity.dat.gz获取 Win下最爱效率利器:AutoHotKey windows环境下mysql5.6数据库的主从同步备份步骤 软路由系统推荐 爬虫实例——通过JS控制滚动条 使用 bitwarden_rs 搭建自托管的密码服务器 Torrent下载工具推荐 ORACLE递归查询 Oracle 树操作(select…start with…connect by…prior) openwrt添加autoconf-archive udp2raw-tunnel配置 CentOS 7 Shadowsocks优化 Debian8 更新源配置
标签聚合
镜像 https 密码 yum chromium 路由 linux 安装 e ssl chrome 网卡 blog git 下载 docker

COPYRIGHT © 2020 狐窝. ALL RIGHTS RESERVED.

THEME KRATOS MADE BY VTROIS