Thursday, September 26, 2013

How to share (read/write) any folder with root permissions in centos 6 or linux

Question:

Now a days many people like software developers uses 2 or more OS. So the people who have multiple PC's with different OS need to share the files or folder between them. So how?


Solution:

Requirement:

i.  Samba
ii. LAN connection

Step 1. Install samba by giving command in centos console -
 
                           yum install samba

Step 2. Configure samba by opening smb.conf 

                           vi /etc/samba/smb.conf

i. Create a workgroup in which you are going to share the files/folders.

by default it is like -

                  workgroup = MYGROUP
change it to -
                                

netbios name = your_host_name 
workgroup = workgroup

because windows system has default group named as WORKGROUP.

ii. Now create a shared resource , where you will indicate the path of the folder you want to share.

        [myshare]
        path = /root/Desktop/share
        writeable = yes 
Where [myshare] is the folder name what you want people to see in their PC.
"path" is the path of your shared folder.

Step 3. Make sure your firewall allows SAMBA.

Step 4. Now test the settings of SAMBA by --

# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
Processing section "[myshare]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
Step 5. Disable SELinux by-      
setenforce 0

        To permanently set it modify the /etc/selinux/config file and set the value of -

SELINUX = permissive

Step 6. Restart SAMBA by -

/sbin/service smb restart


Now you are done!



 
 

No comments:

Post a Comment

How to enable hotspot in TPG iPhone

 By default, the hotspot does not work on the phone. It will ask you to contact the provider. This video will help you bypass the network ...