GNU/Linux: Quickly share folder over SMB

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

GNU/Linux: Quickly share folder over SMB

Post by ^rooker »

This is not a detailed Howto, but mostly notes so I won't forget it:

Got this one from user altair4's post on Linux Mint forums:
This is the command you can use in Thunar's "custom actions" to share a folder readonly by right-click context-menu:

Code: Select all

net usershare add %n %f "" Everyone:R guest_ok=y
NOTE: For mounted drives, you might get the following warning:
net usershare add: cannot share path /mnt/public as we are restricted to only sharing directories we own.
Ask the administrator to add the line "usershare owner only = false"
to the [global] section of the smb.conf to allow this.
Just add the line "usershare owner only = false" to your /etc/samba/smb.conf, and restart the samba service:

Code: Select all

$ service smbd restart
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply