Debian 11 - Create Samba Share
The following tutorial will show you how to quickly set up a samba share that can only be accessed by a logged in user. This is useful for things like setting up a SAMBA area to act as a Proxmox backups storage location.
Related Posts
Steps
Install Packages
First install the required packages:
Backup
Let's take a backup of the default SAMBA configuration file first, in case we need it later:
Run Script To Create SAMBA Configuration
Then edit the following BASH script with the details of which folder you wish to share, and for which the user and group the files should be owned by. When you have done this, run it.
Debugging
If you experience issues, you may find it useful to run the testparm
command.
This will tell you if there are any issues with your samba configuration.
References
- How to install Samba server on Ubuntu 12.04
- ServerFault - How do I force specific permissions for new files/folders on Linux file server?
- Ask Ubuntu - I cant get samba to set proper permissions on created directories
- Configure permissions and ownership for Samba on Linux
- How-To Geek - Create a Samba User on Ubuntu
- NixCraft - Test your Samba server for configuration errors
First published: 11th January 2025