Page 1 of 1

GNU/Linux: Quickly share folder over SMB

Posted: Sun Mar 09, 2014 12:35 am
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