Open Samba Share Files in LibreOffice: Step-by-Step
In this article
To open a file from a Samba share in LibreOffice, you can browse the network share directly from LibreOffice’s file picker, or mount the share in your OS and open it like a local file. The simplest method is to use the file picker’s network location feature—no extra software needed. Below are the exact steps for Linux, Windows, and macOS, plus fixes for common issues.
What You'll Need
- A working Samba share on your network (server address, share name, and credentials if required).
- LibreOffice installed on your computer (version 6.0 or newer recommended).
- Network access to the Samba server (same LAN or VPN).
- On Linux, you may need the
smbclientorcifs-utilspackage installed for mounting, but browsing via the file picker usually works without them.
Step-by-Step
Method 1: Open Directly from LibreOffice (All OS)
- Launch LibreOffice (Writer, Calc, Impress, etc.).
- Click File in the top menu, then Open (or press Ctrl+O on Windows/Linux, Cmd+O on macOS).
- In the file picker dialog, look for a field or button labeled File name or Location (the exact label varies by OS and LibreOffice version).
- Type the Samba share path directly. Use one of these formats:
- Windows/Linux:
smb://server/share/folder/file.odt - macOS:
smb://server/share/folder/file.odt(same format works) - If you don’t know the exact path, browse instead: click the Network or Browse Network icon in the sidebar (if visible).
- Windows/Linux:
- Press Enter or click Open. If prompted, enter your Samba username and password (check “Remember password” if you want to avoid retyping).
- The file will open. When you save (Ctrl+S), LibreOffice writes back to the share directly.
Method 2: Mount the Share First (Recommended for Frequent Use)
- On Linux:
- Open your file manager (e.g., Files, Dolphin, Nautilus).
- Click Other Locations (or Network in some file managers).
- Enter the server address in the “Connect to Server” box:
smb://server/share - Enter credentials when asked. The share will appear as a mounted folder.
- Now open LibreOffice and use File > Open to navigate to that mounted folder—it behaves like a local drive.
- On Windows:
- Open File Explorer.
- Right-click This PC and select Map network drive.
- Choose a drive letter (e.g., Z:) and enter the path:
\\server\share - Check “Connect using different credentials” if needed, then click Finish.
- Once mapped, the drive appears under “This PC”. Open it in LibreOffice’s file picker like any local folder.
- On macOS:
- In Finder, press Cmd+K to open “Connect to Server”.
- Enter
smb://server/shareand click Connect. - Enter credentials. The share mounts on your desktop or under “Locations” in Finder.
- Open LibreOffice and use File > Open to navigate to that mounted volume.
Note: Menu labels like “Other Locations” or “Map network drive” can vary slightly between OS versions and desktop environments. If you don’t see the exact wording, look for a “Network” or “Connect to Server” option.
Common Mistakes
- Using the wrong path format: On Windows, Samba paths use backslashes (
\\server\share) in Explorer, but LibreOffice’s file picker on Windows also accepts forward slashes (//server/share). On Linux/macOS, always usesmb://. - Forgetting credentials: If the share requires a password and you leave it blank, you’ll get an access denied error. Always enter the correct username and password.
- Not refreshing the file picker: After connecting to a share, the file list may not update automatically. Click the refresh icon or press F5.
- Opening a file that is already open elsewhere: If another user has the file open, you may get a read-only warning. LibreOffice will open it read-only; you can save a copy locally.
Tips
- For a permanent mount on Linux, add an entry to
/etc/fstabusing thecifstype. This requires root access and thecifs-utilspackage. Example line://server/share /mnt/share cifs username=yourname,password=yourpass,uid=1000,gid=1000 0 0 - If you often work with the same share, save a bookmark in your file manager (e.g., in Nautilus, click the star icon).
- LibreOffice can also open files directly from a URL if you use File > Open and paste the
smb://link—no need to mount. - For large files over slow networks, consider copying the file locally, editing, then re-uploading—but be careful to avoid overwriting others’ changes.
Troubleshooting
“Failed to open” or “Connection refused” error
- Check that the Samba server is running and reachable: ping the server’s IP address or hostname.
- Verify the share name is correct. On the server, run
smbstatusor list shares withsmbclient -L //server -U username. - Try connecting with a different protocol: some servers only support SMBv2 or SMBv3. If you’re using an older client, you may need to enable SMBv1 (not recommended for security).
- Check your firewall: on Linux,
sudo ufw statusto see if Samba (port 445) is blocked.
“Permission denied” when saving
- Ensure your Samba user has write permission on the share folder. On the server, check the folder’s permissions and the Samba configuration (
writable = yesinsmb.conf). - If you mounted the share, check the mount options—on Linux, if you mounted with
ro(read-only), remount withrw.
File opens read-only unexpectedly
- Another user may have the file open. LibreOffice will show a lock icon; you can open a copy.
- Check if the share itself is read-only. Ask the server admin.
LibreOffice file picker doesn’t show “Network”
- On some Linux desktops, the network browsing feature requires
gvfsandgvfs-backendspackages. Install them via your package manager. - If browsing is unavailable, just type the
smb://path directly in the file name field—this works even without the network icon.
Slow performance when opening large files
- Copy the file to your local disk first, edit, then upload back. Be mindful of concurrent edits.
- Use a wired connection if possible.
Frequently Asked Questions
Can I open a Samba file without mounting the share?
Yes. In LibreOffice’s file picker, type smb://server/share/path/file.odt directly and press Enter. It will connect on the fly.
Why does LibreOffice ask for a password every time?
LibreOffice does not store Samba credentials by default. Check “Remember password” in the dialog, or mount the share in your OS (which caches credentials).
Can I edit a file on Samba directly, or do I need to download it?
You can edit directly—LibreOffice opens the file from the share and saves back to it. However, if the network drops, you may lose changes. For critical work, save a local copy.
Does LibreOffice support SMB2 or SMB3?
LibreOffice uses the operating system’s network stack, so it supports whatever SMB versions your OS supports. Modern Windows, macOS, and Linux distributions support SMB2/3.
Why can’t I see the share in the file picker’s network list?
This often happens on Linux when GVfs is not installed. Install gvfs-backends and restart LibreOffice. Alternatively, type the full path manually.
Is it safe to edit a file on a Samba share over the internet?
Only if the connection is encrypted (e.g., VPN or Samba over SSH). Plain SMB is not encrypted and can be intercepted. For remote access, use a VPN.