Sunday, October 28, 2012

Windows Files Sharing with Linux

Configure sharing for Windows under Linux is really a headache for linux beginner like me. There are a lot of tutorials out there to teach you how to do it but none of that really give a quick and straight forward solution to new learner.

After a day of hunting for solution, finally I come across Webmin. This is really life saver for windows based user who just embrace Linux, as all settings can be done within web browser. It makes configuring Linux as easy as working with NAS web configuration.

However, the pain to share file for windows doesn't get lesser even with that. In windows we can easily bring up Advanced File Sharing dialog and set permission based on per individual user. Afaik in Linux the file permission cannot be set based on individual user, there is only 3 permission if you right click > properties.

So how do we set file share permission based on individual user in Linux? The answer is by using the read-list, write-list in the smb.conf (samba sharing configuration file). Here's a simple guideline:
  1. Log into Webmin
  2. Create share folder under Samba Windows Files Sharing
  3. Under Security & Access Control, assigned the user into appropriate field (for example, User A in read-only, User B in Read-Write)
  4. You might want to add user(s) under Invalid User in order to prevent unauthorized access to the shared folder.
  5. Once you are done with this, open up Nautilus / Thunar / Dolphin, locate the folder you gonna to share, right-click > properties > under "Others", set to Read/Write, and enable Recursive for sub-folder and files under same directory.
  6. Next restart samba service.
  7. Now you should have setup the file sharing properly.
If you don't, please do not hesitate to drop me a comment, I will try to answer as my steps listed above might miss out something, and due to very limited experience now, I might mislead in certain aspect, but don't worry, let's figure it out together.
 

No comments:

Post a Comment