{"id":13588896,"url":"https://github.com/45Drives/cockpit-file-sharing","last_synced_at":"2025-04-08T06:33:01.211Z","repository":{"id":38621001,"uuid":"372911309","full_name":"45Drives/cockpit-file-sharing","owner":"45Drives","description":"A Cockpit plugin to easily manage samba and NFS file sharing.","archived":false,"fork":false,"pushed_at":"2025-04-01T18:29:53.000Z","size":7256,"stargazers_count":703,"open_issues_count":35,"forks_count":38,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-01T19:37:05.378Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/45Drives.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-01T17:28:14.000Z","updated_at":"2025-04-01T18:29:57.000Z","dependencies_parsed_at":"2024-04-23T15:28:10.832Z","dependency_job_id":"5919e68d-b47f-45e1-819c-7791fb557935","html_url":"https://github.com/45Drives/cockpit-file-sharing","commit_stats":null,"previous_names":[],"tags_count":70,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/45Drives%2Fcockpit-file-sharing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/45Drives%2Fcockpit-file-sharing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/45Drives%2Fcockpit-file-sharing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/45Drives%2Fcockpit-file-sharing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/45Drives","download_url":"https://codeload.github.com/45Drives/cockpit-file-sharing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247792234,"owners_count":20996880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:07:00.698Z","updated_at":"2025-04-08T06:32:56.199Z","avatar_url":"https://github.com/45Drives.png","language":"Vue","funding_links":[],"categories":["Vue"],"sub_categories":[],"readme":"# cockpit-file-sharing\nA Cockpit plugin for managing Samba and NFS shares.\n\n![Example of creating a Samba share](docs/create-samba-share-example.gif)\n## Features\n### Samba\n- Manage global setings\n    - Server description, workgroup, log level\n    - Any other settings can be configured through the *Advanced Settings* dropdown\n    - One-click advanced configuration global MacOS share optimization\n- Manage shares\n    - Create, edit, and remove shares\n    - Manage allow-list of valid users and groups\n    - One-click advanced configuration for Windows ACLs, shadow copy, MacOS share optimization, and audit logging\n    - Create non-existing share path from UI\n    - Manage Linux-side share path permissions\n    - Ceph-specific options\n        - Quota\n        - Layout pool\n        - Cephfs remount for properly reporting quota to client\n    - Export and import of configuration (same format as `/etc/samba/smb.conf`)  \n\nUser and group management was removed from cockpit-file-sharing in favour of managing Samba users through the new [cockpit-identities](https://github.com/45drives/cockpit-identities) plugin. Install that plugin to manage groups and Samba passwords.\n### NFS\n- Create, edit, and remove shares\n- Manage individual client settings\n- Export and import of configuration (same format as `/etc/exports`)\n\n# Installation\nRecommended: [cockpit-identities](https://github.com/45drives/cockpit-identities) for managing Samba password.\n## Ubuntu 20.04\n### From 45Drives Repo (Recommended, Ubuntu 20.04 only)\n```bash\ncurl -sSL https://repo.45drives.com/setup | sudo bash\nsudo apt-get update\nsudo apt install cockpit-file-sharing\n```\n### Direct from .deb\nInstalling this way may work for other versions of Ubuntu and Debian, but it is unsupported. You won't get automatic updates this way.\n```bash\ncurl -LO https://github.com/45Drives/cockpit-file-sharing/releases/download/v4.1.0/cockpit-file-sharing_4.1.0-1focal_all.deb\nsudo apt install ./cockpit-file-sharing_4.1.0-1focal_all.deb\n```\n## Rocky 8\n### From 45Drives Repo (Recommended, Rocky 8 only)\n```bash\ncurl -sSL https://repo.45drives.com/setup | sudo bash\nsudo dnf install cockpit-file-sharing\n```\n### Direct from .rpm\nInstalling this way may work for other versions of Rocky/Centos/RHEL/Fedora/etc, but it is unsupported. You won't get automatic updates this way.\n```bash\n# dnf or yum\nsudo dnf install https://github.com/45Drives/cockpit-file-sharing/releases/download/v4.1.0/cockpit-file-sharing-4.1.0-1.el8.noarch.rpm\n```\n## Generic Installation\n1. Install Dependencies\n```bash\n# debian-like\ncockpit-bridge\ncoreutils\nattr\nfindutils\nhostname\niproute2\nlibc-bin\nsystemd\nnfs-kernel-server\nsamba-common-bin\n# RHEL-like\ncockpit-bridge\ncoreutils\nattr\nfindutils\nhostname\niproute\nglibc-common\nsystemd\nnfs-utils\nsamba-common-tools\n```\n2. Download pre-built archive and install\n```bash\ncurl -LO https://github.com/45Drives/cockpit-file-sharing/releases/download/v4.1.0/cockpit-file-sharing_4.1.0_generic.zip\nunzip cockpit-file-sharing_4.1.0_generic.zip\ncd cockpit-file-sharing_4.1.0_generic\n# no need to run `make` first, the plugin is pre-built\nsudo make install\n```\n# Usage\n## Samba Management Tab\nThe Samba tab in cockpit-file-sharing is a front end UI for the [net conf](https://linux.die.net/man/8/net) registry used by Samba. Any shares manually configured in `/etc/samba/smb.conf` won't show up in the UI, but they can be imported with the `Import` button at the bottom of the page. Your Samba configuration file must have `include = registry` in the `[global]` section, which can be automatically configured in one click in the UI.\n### Adding a Share\nSimply click the `+` in the top right of the shares list, fill out the required fields, and click `Confirm`.\n#### Fields/Settings\n* Share Name - Unique name for the share\n* Share Description - Optional description for the share\n* Path - The path to share out from the server\n* ~~Valid Users/Groups~~ removed in v4 - valid users property still available through advanced settings.\n    * ~~Allow-lists for users and groups~~\n    * ~~By default, any user or group is allowed~~\n* Guest Ok - Allow accessing share with no password, privileges mapped to `guest account` (default=`nobody`)\n* Read Only - Disallow creation/modification of files/directories\n* Browsable - Controls whether this share is seen in the list of available shares in a net view and in the browse list\n* Inherit Permissions - New directories inherit the mode of the parent directory, including bits such as setgid. New files inherit their read/write bits from the parent directory.\n* Windows ACLs - Administer share permissions from Windows, sets the following advanced settings\n    ```ini\n    map acl inherit = yes\n    acl_xattr:ignore system acls = yes\n    vfs objects = acl_xattr\n    ```\n* Shadow Copy - Expose per-file snapshots to users, sets the following advanced settings\n    * ZFS:\n        ```ini\n        vfs objects = shadow_copy2\n        shadow:snapdir = .zfs/snapshot\n        shadow:sort = desc\n        shadow:format = %Y-%m-%d-%H%M%S\n        ```\n    * Ceph:\n        ```ini\n        vfs objects = ceph_snapshots\n        ```\n* MacOS Share - Optimize share for MacOS, sets the following advanced settings\n    ```ini\n    vfs objects = catia fruit streams_xattr\n    fruit:encoding = native\n    fruit:metadata = stream\n    fruit:zero_file_id = yes\n    fruit:nfs_aces = no\n    ```\n* Audit Logs - Turn on audit logging, sets the following advanced settings\n    ```ini\n    vfs objects = full_audit\n    full_audit:priority = notice\n    full_audit:facility = local5\n    full_audit:success = connect disconnect mkdir rmdir read write rename\n    full_audit:failure = connect\n    full_audit:prefix = %u|%I|%S\n    ```\n* Advanced Settings - Dropdown for configuring any other share parameters. See [smb.conf(5)](https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html) for a full list of parameters.\n### Editing a Share\nClick the pencil icon at the right side of the share list entry to edit the share. Settings are the same as creating a share, except you cannot change the share name or path.\n### Removing a Share\nClick the trash can icon at the right side of the share list entry, then click `Yes` in the confirmation prompt to delete the share. This only removes the share definition from Samba, it does **not** remove any files.\n### User and Group Management\nUser and group management was removed from cockpit-file-sharing, in favour of implementing it in a separate plugin, [cockpit-identities](https://github.com/45drives/cockpit-identities)\n### SeDiskOperatorPrivilege\nThis section was removed from cockpit-file-sharing.\n### Import Shares from `/etc/samba/smb.conf`\nTo allow cockpit-file-sharing to manage existing shares defined in `/etc/samba/smb.conf`, click the `Import configuration from /etc/samba/smb.conf` button at the bottom of the page.\nIt will confirm before overwriting your current share settings, and prompt to replace the content of `/etc/samba/smb.conf` with only `include = registry` in the `[global]` section,\nbacking up the original content to `/etc/samba/smb.conf.bak.~1~`.\n\n## NFS Management Tab\nThe NFS tab in cockpit-file-sharing is a graphical way of editing the contents of `/etc/exports.d/cockpit-file-sharing.exports`, which has the same syntax as `/etc/exports`.\n### Adding a Share\nMuch like the Samba tab, simply click the `+` in the top right of the shares list to start adding an NFS export. The only settings are the path to the directory you want to share, and a list of clients consiting of a host and a comma-separated list of export options for that host. See [exports(5)](https://linux.die.net/man/5/exports) for options and machine name formats for the host field.\n### Editing a Share\nClick the pencil icon at the right side of the share list entry to edit the share. Settings are the same as creating a share.\n### Removing a Share\nClick the trash can icon at the right side of the share list entry, then click `Yes` in the confirmation prompt to delete the share. This only removes the share definition from Samba, it does **not** remove any files.\n### Import Shares (Exports) from `/etc/exports`\nTo allow cockpit-file-sharing to manage existing shares defined in `/etc/exports`, do the following (as root):\n1. Create a backup copy of exports: `cp /etc/exports /etc/exports.bak`\n2. Move exports to cockpit-file-sharing managed location: `mv /etc/exports /etc/exports.d/cockpit-file-sharing.exports`\n3. Create an empty default exports file: `touch /etc/exports`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F45Drives%2Fcockpit-file-sharing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F45Drives%2Fcockpit-file-sharing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F45Drives%2Fcockpit-file-sharing/lists"}