Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have followed steps to install samba on ubuntu from

http://www.howtogeek.com/howto/ubuntu/install-samba-server-on-ubuntu/

But it didn't tell me how can i add a directory e,g

/var/www

in to share with window users or macusers

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Sample smb.conf share section.

This creates a single share named "Utilities" for the folder /opt/Utils. It gives write access to user "username", denies access to user "root", read access to the guest user and everyone else. Some example options are included that demonstrate file & directory creation masks and filename case handling.

# share name
# this is the name of the share shown in Windows share browser and "net view" command
[Utilities]

        # comment shows up in Windows share browser
        comment = Handy-dandy software repository

        # path to share
        path = /opt/Utils

        # share security -- who can access, who can't, who can write
        write list = username
        read only = yes
        directory mask = 0755
        create mask = 0644
        guest ok = Yes
        invalid users = root

        # filename case options, mostly for Win clients
        case sensitive = True
        default case = lower
        preserve case = yes
        short preserve case = yes
share|improve this answer
    
There is no [utilities] text written in that file –  OooooO Dec 9 '09 at 5:07
    
this is just an example. change [Utilities] to whatever you want your share name to be, and change path = to the folder you want to share, and change the security & case options to whatever you need. –  quack quixote Dec 9 '09 at 5:15
    
that worked perfectly buddy –  OooooO Dec 9 '09 at 5:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.