Sharing File/Folder with Samba on Linux

December 31, 2016 | Views: 4616

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here

Sharing Files/Folders with Samba on Linux

First you should install the samba module with using command line;

#apt-get install samba

Then, create a folder,has everyone (read-write) authorisation, on desktop

#cd Desktop

#mkdir -p “folder_name”

#chmod 777 “folder_name”


Then, open samba config folder and add these commands;

#vi /etc/samba/smb.conf

[test$] comment = Sharing folder
path = /root/Desktop/test
browseable = yes
guest ok = yes
read only = yes
public = yes
writable = yes


After making all changes on folder, we can start the samba service

#service samba start

Now, when the running “\”IP_address_of_Linux”test$ ” command any computer on the same network, it will be accessed the “test” folder on Linux machine.


Share with Friends
Use Cybytes and
Tip the Author!
Share with Friends
Ready to share your knowledge and expertise?
  1. this is not a complete guide.

  2. Wouldn’t it be better to create Users and remove the rw flag on Others? Also, you are creating the shared folder as root, this means the permission on the folder is root:root. Sure it won’t create issue with Windows users? And a Windows user that will create a file inside this folder, what permissions will have the file and which group?
    I don’t know.. it is easy to type 3 command and have Samba working, but it won’t work properly.

    I created this for you because I can not post it in the comments due to codes in it. Have a look 😉

  3. how can i see the ip adress of other computers in the same wifi. Im using windows. answer please

Comment on This

You must be logged in to post a comment.

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Support Cybrary

Donate Here to Get This Month's Donor Badge


We recommend always using caution when following any link

Are you sure you want to continue?