samba

Discussion in 'General Mac Discussion' started by Natalia81, Oct 12, 2004.

  1. Natalia81 macrumors regular

    Joined:
    Aug 7, 2004
    #1
    So after tons of research, I found that you can modify the smb.conf file to share resources outside your home folder. My changes seem to work.

    Here is what I inserted into my file:

    [nameOfShare]
    comment = External Firewire Hard Drive
    path = /Volumes/myExternalDrive
    guest ok = no
    read only = no
    browseable = yes
    writeable = yes
    write list = @mygroup

    I noticed a lot of references had "create mode = " some number. What is this for? I believe I remember something in Unix chmod 777 where each 7 was a setting for read/write/ or something like that. Or maybe I'm just mixing all that computer science crap up :rolleyes:

    Thanks for you help...
     
  2. tomf87 macrumors 65816

    tomf87

    Joined:
    Sep 10, 2003
    #2
    Create mode modifies the Unix permissions on newly created files. Here's a rundown of permissions in Unix.

    You have 3 bits for access that apply to owner, group, and everyone. This gives 9 bits in total. These numbers apply:

    Read - 4
    Write - 2
    Execute - 1

    To get the numerical value of the permissions, simply add up each group's numbers then append them to each other.

    Let's look at a file (this is the program ls in /bin):

    -r-xr-xr-x 1 root wheel 32464 30 Aug 21:35 ls

    Okay we see that the file is owned by user root and group wheel. Let's add it up:

    -(r-x)(r-x)(r-x) 1 root wheel 32464 30 Aug 21:35 ls
    (4+1)(4+1)(4+1) = 555

    Here's some common numbers for you:

    644 = -rw-r--r-- = Writable by owner, readable by group and everyone
    755 = -rwxr-xr-x = Writable executable by owner, readable executable by group and everyone

    Here's some thoughts on this:

    1. For a directory (characterized by a 'd' in the first field, example following), if you want anyone to be able to go into that directory, they must have executable permissions.

    Look at /bin:

    drwxr-xr-x 35 root wheel 1190 30 Aug 21:35 /bin
    ^-> that means it is a directory. Notice the 755 perms?

    2. You only need the executable bit set on any file you want to run on the Unix box. For a file share, I would recommend perms of read/write only for those who need it.
     
  3. Westside guy macrumors 601

    Westside guy

    Joined:
    Oct 15, 2003
    Location:
    The soggy side of the Pacific NW
    #3
    Actually, "create mode" is an alias for "create mask". When a file is created, the bits you set in "create mode are logically ANDed with the bits that normally would be set by default. So if you have "create mode 700", and a new file is normally created with permissions 644, a file created over a samba connection will be given permissions 600.

    The best source for samba documentation is its man pages, which I find more readable via the web. You can get to the on-line version of the page for smb.conf, for example, via samba's website: http://us3.samba.org/samba/docs/man/smb.conf.5.html
     
  4. neilrobinson macrumors 6502

    Joined:
    Aug 21, 2004
    Location:
    Perth, WA, Australia
    #4
    i use brickwall for stuff like that... not quite as easy to make a mistake... epsecially after a few drinks :rolleyes:
     
  5. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #5
    If you don't want to muck with the conf files, you could always use
    SharePoints
     

Share This Page