Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Natalia81

macrumors regular
Original poster
Aug 7, 2004
202
0
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...
 
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.
 
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.