linuxwebcluster.com

samba server share

As a follow up to the smbclient quick and dirty post... Here's smb server "quick and dirty". Sometimes I have some files I download on my Windows laptop, maybe a tarball or rpm or something like that. Instead of going through the hassle of rsync over cygwin or some other convoluted way to get files from Windows to Linux, the easy way is to turn on samba on the Linux box.

First make a directory to hold the files:
mkdir /usr/src/files

Then open up the permissions so a windows "guest" can write to this directory through samba:
chown nobody /usr/src/files
chmod 777 /usr/src/files

Usually samba is installed by default, but if not, use your package manager like so (on RH / Centos):
yum install samba

All that's left now is the configuration file, found at /etc/samba/smb.conf. Of the many, many possible options, very few are required to get a simple file share. Following is a minimal smb.conf that will share the directory we created earlier:
#======================= Global Settings =====================================
[global]
        security = share
#============================ Share Definitions ==============================

[fileshare]
        comment = simple network file share
        path = /usr/src/files
        public = yes
        read only = no

Et voila  (or "viola" as so many bloggers seem fond of...    ;-)     'service  smb restart' and you can now access the share from your windows machine by clicking Start, Run,  \\server-ip\fileshare.
 

Add your comment

Your name:
Subject:
Comment:

Subscribe to the Linux Admins Blog and get new posts delivered by email!
Enter your email address:

Delivered by FeedBurner

Linux News


Tell the developers:

The type of clustering you are most likely to deploy is:
 
What Linux distro do you use for clusters?
 

Copyright 2010    RapidScale Clusters, LLC