A Cockpit plugin to easily manage samba and NFS file sharing.

Overview

cockpit-file-sharing

A Cockpit plugin to easily manage samba and NFS file sharing.

Table of Contents

General

Features

  • Add and edit Samba shares
  • Full control of Samba Share parameters
  • Auto populate parameters with commonly used settings
  • Edit global Samba config
  • Manage Samba users and their groups
  • Add and remove groups
  • Set SeDiskOperator Privileges
  • Add and remove NFS sharing with full control of permissions and client IPs

Samba Manager Screenshot

Samba Manager Interface

NFS Manager Screenshot

NFS Manager Interface

Installation

From 45Drives Repo

Ubuntu

$ wget -qO - http://images.45drives.com/repo/keys/aptpubkey.asc | apt-key add -
$ curl -o /etc/apt/sources.list.d/45drives.list http://images.45drives.com/repo/debian/45drives.list
$ apt update
$ apt install cockpit-file-sharing

Rocky

$ curl -o /etc/yum.repos.d/45drives.repo http://images.45drives.com/repo/centos/45drives-centos.repo
$ dnf clean all && dnf makecache
$ dnf install cockpit-file-sharing

CentOS 7

$ curl -o /etc/yum.repos.d/45drives.repo http://images.45drives.com/repo/centos/45drives-centos.repo
$ yum clean all && yum makecache
$ yum install cockpit-file-sharing

From Source

Ensure dependencies are installed: cockpit, python3, samba, nfs-kernel-server.

$ git clone https://github.com/45Drives/cockpit-file-sharing.git
$ cd cockpit-file-sharing
$ make install

Samba Manager

Samba manager is used to setup samba shares in an efficient manner.

The main component to this manager is the "Share Management" card. This is used to edit and add samba shares. To add a share you simply click the "+" button.

Add Share

Add Samba Share Menu

You have full ability to customize your share the way you want it. Looking through the options in the menu, a lot are self explanatory, such as share name and description, however the rest of the options can be complicated. Down below are the options and their descriptors.

  • Path - The path to the directory on the server you would like to share
  • Windows ACLs - Checking the box adds parameters that enables access control list on the share
  • Valid Users - Users who can access the share
  • Valid Groups - Groups that can access the share
  • Guest Ok - Checking this box makes the Samba Share not require a password to access
  • Browsable - Controls whether the share is seen a list of available shares in net view

Advanced Settings

Advanced Samba Settings

Under the advanced settings tab there is an input box. You can enter any extra Samba settings you want into this box. We have implemented templates that will auto populate the input box with popular settings many users use. Down below is a description of these auto populate settings.

  • Shadow Copy - Utilizes microsoft's shadow copy service which creates backup copies or snapshots of files within the samba share
  • MacOS Share - Allows shares to be seen on MacOS
  • Audit Logs - Adds ability to record events and changes on the samba share

For any more info on settings that can be inserted into this area, please checkout the samba config documentation, https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html.

Removing Shares

Removing Samba Shares

Removing shares is as simple as clicking the "X" beside the share you would like to delete, then confirm that you want to remove the share.

Editing Global Settings

Global Samba Settings

In the global settings, you can change the description of the server as well as the amount of logs that are viewable. Much like the advanced samba settings, there is a input section to add any parameter you would like to set for all your shares on your server.

Group Management

Group Management

Adding a group is as simple as pressing the "+" button, name the group, then confirm. Removing the group is just as easy, click the "X" next to the group you would like to delete, then confirm.

User Management

User Management

Managing Samba Users in file sharing is as easy as can be. First you select the user to manage, you can then add as many groups as you want to the user and also delete groups from a user if needed!

Password

Changing the password of a samba user is possible through the "Set Samba Password" button. You can remove the password by clicking the "Remove Password" button, then confirm.

SeDiskOperatorPrivilege

Add Privilege

You can add privileges by clicking on the "+" button. You will be greeted with the menu above, you can set the group of the privilege and you can add a username and password. Remove privileges by clicking the "X" besides the privilege.

NFS Manager

NFS

You can add a NFS export by clicking "+" button. Within the nfs add menu, you have the options for name and path. There is also a section for clients. You may add a client by clicking the "+" button. This will give you another set of IP and options. The IP is who can access the particular export and the options are the permissions that IP has on the export. By adding multiple clients you can have multiple IP address accessing the same export, all having different permissions.

We have set the default IP to "*". This means that anyone can have access to that export. We have set defaults of permissions to rw,sync,no_tree_subcheck. If you want to enter your own permissions, do so by separating the options by commas (See out defaults for example). Check https://linux.die.net/man/5/nfs to see a full list of available options/permissions.

Removing a NFS is as easy as clicking the "X" beside the NFS you would like to delete, then confirm.

Comments
  • Cannot log in to samba file sharing from MacOS

    Cannot log in to samba file sharing from MacOS

    Bug Info

    Describe the bug Trying to connect from MacOS gives me the error: The server may not exist or is unavailable at this time...

    To Reproduce Steps to reproduce the behavior:

    1. Go to Finder>Network
    2. Click on the server
    3. Click "Connect as..."
    4. See error

    Expected behavior Successful connection.

    Screenshots

    Screenshot 2022-08-27 at 12 09 33 PM

    Client Side

    Desktop (please complete the following information):

    • OS: MacOS
    • Version Monterey 12.5.1

    Server Side

    • OS: Rocky 8
    • Cockpit Version: 264.1

    Additional context Used to work well before the most recent changes in the cockpit modules. Connecting with "Connect to server..." allows me to enter the username and password but always rejects it (shaking login window).

    opened by fvlasie 20
  • Install or Permission issue

    Install or Permission issue

    Hello, Not sure if this is the correct place for this. I installed cockpit-file-sharing on my newly genned Ubuntu server running Ubuntu 20.04.2 LTS. the samba file sharing is overlaid with the spinning 45Drives spinning logo and an error shows up "Can't load /etc/samba/smb.conf - run testparm to debug it"

    smb.conf does exist and I can edit it as sudo testparm runs as sudo and has no issues or errors and samba works fine.

    My user login to cockpit does have sudo privs and other items in cockpit do get elevated correctly. perms on smb.conf -rw-r--r-- 1 root root 9273 Jun 22 16:07 /etc/samba/smb.conf I am not sure how to proceed.

    image

    opened by Tonelock2021 6
  • Error in NFS section

    Error in NFS section

    Bug Info

    Describe the bug I can use Samba section but NFS section is not working at all.

    The project is amazing. This extension for managing NAS options from cockpit is great.

    Screenshots image image

    Client Side

    Desktop (please complete the following information):

    • OS: Linux
    • Browser [e.g. chrome, safari]: Chrome
    • Version [e.g. 22]
    opened by macvaz 5
  • Existing Shares

    Existing Shares

    Thanks for the plugin! I installed it after configuring Samba through smb.conf with the shares I needed. Those shares aren't showing up on Cockpit. Do I have to remove the share and recreate it through the GUI before it's visible?

    opened by alexfornuto 4
  • Cannot add LDAP users to shares

    Cannot add LDAP users to shares

    This tool relies on parsing the output of getent passwd in order to get a user list for adding to shares, however this does not work in many cases when the system is a domain member. For example, the default behavior of SSSD is to not populate the full contents of the user list via getpwent() calls, due to the extreme performance impact that loading so many users can cause.

    It would be better if this Cockpit application instead (or additionally) provided a text-entry for the usernames that would just validate that getent passwd <username> (or getpwnam('username')) returns a valid entry before accepting it.

    opened by sgallagher 4
  • Adding KB articles about SMB/NFS to Help button in File Sharing Module

    Adding KB articles about SMB/NFS to Help button in File Sharing Module

    Currently in the file sharing module the help button just lists the default Red Hat Web Console Article:

    file-sharing-help

    Would it be possible to update the manifest.json for the module to include some of the KB articles for managing SMB/NFS etc so it appears like this, and links directly to our KB articles:

    file-sharing-help-2

    enhancement 
    opened by baileyallison 4
  • cockpit-[bridge|system] from your repo breaks cockpit-dashboard on Ubuntu 20.04 LTS

    cockpit-[bridge|system] from your repo breaks cockpit-dashboard on Ubuntu 20.04 LTS

    • OS: Ubuntu 20.04.3 LTS
    • Cockpit version before your repo:

    Context

    I installed cockpit from Ubuntu source and added your repo to manage my Samba (which works marvellously) but in your repo you're more than just your add-ons, you also have cockpit-* which under Ubuntu focal, at least break few packages

    Detail

    Applying updates failed
    The following packages have unmet dependencies:
      cockpit-system: Breaks: cockpit-dashboard but 215-1 is to be installed
      cockpit-dashboard: Depends: cockpit-ws (< 215-1.1~) but 237.2-1focal is to be installed
      cockpit-bridge: Breaks: cockpit-dashboard (< 233) but 215-1 is to be installed
    
    apt-cache policy cockpit
    cockpit:
      Installed: 215-1
      Candidate: 237.2-1focal
      Version table:
         252-1~ubuntu20.04.1 100
            100 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages
         237.2-1focal 500
            500 http://images.45drives.com/repo/debian focal/main amd64 Packages
     *** 215-1 500
            500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
            100 /var/lib/dpkg/status
    

    Possible workaround

    1

    I was thinking of pinning your repo with a lower priority, but apparently my pinning simply won't want to work, which any will only fix the issue for myself.

    cat /etc/apt/preferences.d/cockpit
    Package: cockpit-*
    Pin: origin "images.45drives.com"
    Pin-Priority: 400
    

    2

    You come with a solution which could be removing those file from your repo or a better one if you know it.

    3

    You tell me

    opened by JOduMonT 4
  • icon fonts not loading (fontawesome.woff 404)

    icon fonts not loading (fontawesome.woff 404)

    Bug Info

    Describe the bug Icon font is not loading on the page

    To Reproduce Steps to reproduce the behavior:

    1. Install cockpit and cockpit-file-sharing on Fedora 36
    2. Open cockpit, click on "file sharing" (firefox and chrome both have the problem)
    3. Icon fonts are not loading Screenshot from 2022-09-12 09-50-45
    4. In dev console, there is a 404 request for the font file Screenshot from 2022-09-12 09-51-20

    Expected behavior The font should load

    Screenshots See above

    Console Output

    • Firefox:
      • downloadable font: download failed (font-family: "FontAwesome" style:normal weight:400 stretch:100 src index:0): status=2147746065 source: https://server1.hmpg.dev/cockpit/$5e3a684201e1c869874b8329cc82bcace4898145a8ec126c6209130165e28f21/base1/fonts/fontawesome.woff?v=4.2.0
    • Chrome
      • GET https://server1.hmpg.dev/cockpit/$5e3a684201e1c869874b8329cc82bcace4898145a8ec126c6209130165e28f21/base1/fonts/fontawesome.woff?v=4.2.0 net::ERR_ABORTED 404
      • file-sharing-patternfly.css:1

    Client Side

    Desktop (please complete the following information):

    • OS: Fedora 36
    • Browser: Firefox/Chrome
    • Version 104/105

    Server Side

    • OS: Fedora 36
    • Cockpit Version: 275

    The problem is the same on Fedora37 beta and cockpit 276

    Version of cockpit-file-sharing: 2.4.5 on both Fedora 36 and 37 beta

    opened by markhuang1212 3
  • Error installing cockpit-file-sharing in ubuntu 22.04 server

    Error installing cockpit-file-sharing in ubuntu 22.04 server

    Bug Info

    Describe the bug I follow the generic installation instrucctions. When I execute make install, I get this error:

    mac@minipc:~/cockpit-file-sharing_3.2.5_generic$ sudo make install Installing file-sharing Creating install directory mkdir -p /usr/share/cockpit/file-sharing

    Copying files Done installing file-sharing

    cp -af system_files/* / cp: cannot stat 'system_files/*': No such file or directory make: [Makefile:124: system-files-install] Error 1 (ignored)

    To Reproduce Just follow the generic installation instructions on a ubuntu 22.04 server.

    Expected behavior The installations finishes without error.

    Server Side

    • OS: Ubuntu 22.04 server
    • Cockpit Version: cockpit/jammy-backports,now 276-1~bpo22.04.1 all [instalado]
    opened by macvaz 3
  • Allow custom smb.conf location

    Allow custom smb.conf location

    This looks like a cool project! I'd like to try it out but my smb.conf file is located at /usr/local/etc/ksmbd/smb.conf. The syntax is mostly the same as with regular samba. Could this tool be modified to allow custom config file location?

    opened by llamafilm 3
  • Can't get Samba working

    Can't get Samba working

    Installed Ubuntu server on a Proxmox server as a VM, was able to get cockpit and filesharing installed with little issue. I'm now stuck on getting Samba to function properly. When I go to File Sharing > Samba I see this: Annotation 2022-02-20 133343

    So, I go onto the Ubuntu server so I can edit that file and apparently it's a sample: Annotation 2022-02-20 135359

    Could really use some assistance, googling "smb.conf is a sample," hasn't returned helpful results.

    Thanks in advance, -Nick

    opened by daaw-gees 3
  • Package for Ubuntu Server LTS 22.04

    Package for Ubuntu Server LTS 22.04

    Hi, Is it possible to provide a package for Ubuntu Server LTS 22.04 ? Pls do consider.

    Thanks, MCZen

    p.s. - Is there a Ubuntu PPA that has this package ?

    opened by marcoczen 0
  • npm ERR! 404  '@45drives/cockpit-css@^0.1.12' is not in this registry

    npm ERR! 404 '@45drives/cockpit-css@^0.1.12' is not in this registry

    Hi @joshuaboud :wave:

    Bug Info

    Describe the bug '@45drives/cockpit-css@^0.1.12' seems to not be available at npmjs.org

    To Reproduce Steps to reproduce the behavior:

    1. Clone this repository
    2. Issue a make command
    3. See error

    Expected behavior The library is pulled to begin the build

    Screenshots image

    opened by cig0 1
  • Hard dependency on package `cockpit-ws` breaks Podman implementation of `cockpit-ws`

    Hard dependency on package `cockpit-ws` breaks Podman implementation of `cockpit-ws`

    Bug Info

    Describe the bug

    The RPM package for cockpit-file-sharing installs cockpit-ws as a dependency, which conflicts with the Podman-based deployment, as described in https://github.com/cockpit-project/cockpit-container

    To Reproduce Steps to reproduce the behavior: (On a Fedora IoT {36,37} terminal)

    1. rpm-ostree install cockpit-file-sharing
    2. podman container runlabel --name cockpit-ws RUN quay.io/cockpit/ws
    3. See error

    Note: this error occurs with the cockpit-file-sharing version shipped with both Fedora IoT 36 and 37, as well as with the RPM package available in this repository (see details below)

    Server Side

    • OS: Fedora IoT 36 and 37
    • Cockpit Version: 277-1 (Fedora 37) and 278-1 (Fedora 36)

    Additional context

    The issue described above happens with both cockpit-file-sharing version 2.4.5-2 (from the Fedora IoT 36 and 37 official repositories), and with version 3.2.9-2 available here.

    Why does cockpit-file-sharing enforce cockpit-ws as a dependency?

    From what I saw from all other Cockpit applications, none of them has cockpit-ws as a hard dependency (I spent a good amount of time trying to understand which application was breaking my ability to run Cockpit with Podman using the official container when I first encounter this issue ;)

    Thanks!

    opened by cig0 4
Releases(v3.2.9)
Owner
45Drives
45Drives
360Site - A website for sharing 360 video experiences.

360Site A website for sharing 360 video experiences. Links Development links happybirthdaynick-f9c86.web.app happybirthdaynick-f9c86.firebaseapp.com P

null 1 Jan 2, 2022
Sharing the latest stellar Super Mario 64 runs verified on speedrun.com.

SM64-twitter-bot Sharing the latest stellar Super Mario 64 runs verified on speedrun.com. https://twitter.com/SuperMario64Bot Requirements You will ne

hippolyte 4 Jul 14, 2022
🤖A small, robust Discord bot to support and manage a daily word game in your server. (soon™)

Wordable ?? Wordable is a small, robust Discord bot to support and manage a daily word game in your server! Commands /ping - Replies with pong! /guess

Vic Trodd 6 Feb 11, 2022
As of right now, you can't manage Discord webhooks on mobile

Hookly Manage your Discord server's webhooks via Slash Commands Why? As of right now, you can't manage Discord webhooks on mobile. I main reason I bui

Milan M 5 Apr 27, 2022
A bot to manage a whole game jam/hackathon server from a fully functional pollsystem to managing color roles.

Jambo This bot is made to autonomously manage a discord server with regular game jams/hackathons. It will collect the proposals for the jam, create po

null 10 Nov 3, 2022
A bot to manage a whole game jam/hackathon server from a fully functional pollsystem to managing color roles.

Jambo This bot is made to autonomously manage a discord server with regular game jams/hackathons and make it a plasent and happy enviroment. It will c

null 10 Apr 7, 2022
A bot to manage Pterodactyl panels via whatsapp!

whatsactyl A bot to manage Pterodactyl panels via whatsapp! Many thanks to ThisMe124 for contributing so much to building this bot from scratch. For n

JstnLT 19 Dec 26, 2022
Expertly and easily export GreenSock (GSAP) animation to video.

gsap-video-export Expertly and easily export GreenSock (GSAP) animation to video. gsap-video-export is a simple tool for exporting your GreenSock (GSA

Chris Johnson 146 Dec 15, 2022
Whatscode.js is a package to create Whatsapp bots easily and quickly

whatscode.js is a package to create Whatsapp bots easily and quickly, even coding experience is not needed...

JstnLT 21 Dec 30, 2022
An easy bot to create discord buttons easily.

Discord Buttons An easy bot to create discord buttons easily. Note: Node.js 16.6.0 or newer is required. Installation npm install You need to rename e

Fnr 7 Aug 19, 2022
Make configurable canvas easily with Canvafy.

Canvafy Make configurable canvas easily with Canvafy Installation npm i canvafy Documentation Rank Welcome And Leave Spotify Image Example of code con

Pierre-Alexis 8 Dec 11, 2022
🧰 DiscordKit is a package that allows you to easily create a Discord bot.

DiscordKit Developed with ❤️ by Swôth What's DiscordKit? DiscordKit is a package that allows you to ✨ easily ✨ create a Discord bot. Installation Deta

Swôth 5 Oct 29, 2022
A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion

ReactPlayer A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia, M

Pete Cook 7.2k Jan 4, 2023
An app to read a movie file, and indicate which scenes are NSFW.

The NSFW Movie Parser An app to read a movie file, and indicate which scenes are NSFW. You can download the installer for the Windows 10 version here.

dynamite-ready 70 Oct 9, 2022
A video media file convertor using FFmpeg's web assembly port

A video media file convertor using FFmpeg's web assembly port

Atharva Marathe 2 Aug 25, 2022
GitHub action to update your discord status in a file using Lanyard API.

Discord Status Action This action fetches the status of a given user and updates that on a file. - Online - Idle - Do not disturb - Streaming - Offlin

Compey 11 Dec 15, 2022
This package will generate n numbers of thumbnails at different position in a given video file.

About Generate n numbers of Image thumbnails of a video file. !Live Demo code sandbox example video-thumbnail-generate.mp4 This package can be used wi

Rajesh Royal 32 Dec 20, 2022
Audio visualizer library for javascript. Create dynamic animations that react to an audio file or audio stream.

Wave.js Audio visualizer library for javascript. Installation Install With CDN <script src="https://cdn.jsdelivr.net/gh/foobar404/wave.js/dist/bundle.

Austin Michaud λ 497 Dec 21, 2022
JavaScript plugin for playing sounds and music in browsers

JavaScript plugin for playing sounds on user actions and page events. Version: 3.0.7 Project page and demos Download ZIP Support the plugin on GitHub

Denis Ineshin 704 Sep 24, 2022