I have a current problem with a samba server. When files are created a shared disk, the permissions on the file are rw-r-----. This is fine for the owner of the file, but the file is shared and needs to be writable by other users in the same group as the owner I have looked on the web and have come across the following arguments that can be used in the smb.conf file. create mask create mode force create mode and similar ones for directories. Does anyone have any experience setting octal permission bits for these arguments, If so can anyone suggest the bits so that I can have files created with permissions rw-rw-rw-, and directories readable and writable by users in the same group, rwxrwxr-x. Any suggestions or advice will be greatly appreciated Peter
Sorry, just a mistake :)
On Thu, 2006-09-07 at 12:45 -0400, Peter Bloomfield wrote:
I have a current problem with a samba server. When files are created a shared disk, the permissions on the file are rw-r-----. This is fine for the owner of the file, but the file is shared and needs to be writable by other users in the same group as the owner
I have looked on the web and have come across the following arguments that can be used in the smb.conf file. create mask create mode force create mode and similar ones for directories. Does anyone have any experience setting octal permission bits for these arguments, If so can anyone suggest the bits so that I can have files created with permissions rw-rw-rw-, and directories readable and writable by users in the same group, rwxrwxr-x.
Any suggestions or advice will be greatly appreciated
Peter
I have been using the following under the share definition.... all works great! create mask = 0777 force create mode = 0777 dos filetimes = yes force directory mode = 0777 t o n y
On Thu, 2006-09-07 at 14:42 -0400, Peter Bloomfield wrote:
I have been using the following under the share definition.... all works great!
create mask = 0777 force create mode = 0777 dos filetimes = yes force directory mode = 0777
t o n y
Seems to have done it, thanks
Peter
Let me show you how to catch a fish. The "r w x" in binary will have the values "4 2 1". So, "r w -" will have the values "4 2 -", that sums up to 6. So again, "r w x" will be "4 2 1" = 4+2+1 = 7, hence the create mode 777 E-Mail disclaimer: http://www.sunspace.co.za/emaildisclaimer.htm
On Friday 08 September 2006 12:17, Hans van der Merwe wrote:
Let me show you how to catch a fish.
The "r w x" in binary will have the values "4 2 1". So, "r w -" will have the values "4 2 -", that sums up to 6.
So again, "r w x" will be "4 2 1" = 4+2+1 = 7, hence the create mode 777
For those interested in more detail: man chmod explains, e.g., the optional 4th digit which can be used with access rights, and how the umask affects the rights. -- ----- stephan@s11n.net http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts
I have been using the following under the share definition.... all works great!
create mask = 0777 force create mode = 0777 dos filetimes = yes force directory mode = 0777
Seems to have done it, thanks
Let me show you how to catch a fish.
Let me show you how to correctly catch a fish.
The "r w x" in binary will have the values "4 2 1". So, "r w -" will have the values "4 2 -", that sums up to 6.
So again, "r w x" will be "4 2 1" = 4+2+1 = 7, hence the create mode 777
4 | 2 | 1 = 7 Jan Engelhardt --
On Friday 08 September 2006 14:25, Jan Engelhardt wrote:
Let me show you how to correctly catch a fish.
The "r w x" in binary will have the values "4 2 1". So, "r w -" will have the values "4 2 -", that sums up to 6.
So again, "r w x" will be "4 2 1" = 4+2+1 = 7, hence the create mode 777
4 | 2 | 1 = 7
To be perfectly correct, 4+2+1 is *exactly* the same as 4|2|1: 4 = binary 100 2 = binary 010 1 = binary 001 binary 100 + 010 + 001 == binary 111 binary 100 | 010 | 001 == binary 111 The only time there's a difference between + and | is when the bit patterns of the numbers overlap. e.g., 3+1 ist not the same as 3|1: binary 011 + 001 == 100 binary 011 | 001 == 011 -- ----- stephan@s11n.net http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts
On Fri, 2006-09-08 at 14:31 +0200, stephan beal wrote:
On Friday 08 September 2006 14:25, Jan Engelhardt wrote:
Let me show you how to correctly catch a fish.
The "r w x" in binary will have the values "4 2 1". So, "r w -" will have the values "4 2 -", that sums up to 6.
So again, "r w x" will be "4 2 1" = 4+2+1 = 7, hence the create mode 777
4 | 2 | 1 = 7
To be perfectly correct, 4+2+1 is *exactly* the same as 4|2|1:
4 = binary 100 2 = binary 010 1 = binary 001
binary 100 + 010 + 001 == binary 111 binary 100 | 010 | 001 == binary 111
The only time there's a difference between + and | is when the bit patterns of the numbers overlap. e.g., 3+1 ist not the same as 3|1:
binary 011 + 001 == 100 binary 011 | 001 == 011
Come on, you people are scaring off people :) E-Mail disclaimer: http://www.sunspace.co.za/emaildisclaimer.htm
4 | 2 | 1 = 7
To be perfectly correct, 4+2+1 is *exactly* the same as 4|2|1:
Yes but only that speicific case.
The only time there's a difference between + and | is when the bit patterns of the numbers overlap. e.g., 3+1 ist not the same as 3|1:
binary 011 + 001 == 100 binary 011 | 001 == 011
It becomes important as you write code: S_IRUSR | S_IWUSR | S_IXUSR S_IRUSR + S_IWUSR + S_IXUSR as you cannot rely on S_I[RWX]USR being single-bit values. Jan Engelhardt --
On Friday 08 September 2006 15:49, Jan Engelhardt wrote:
It becomes important as you write code:
S_IRUSR | S_IWUSR | S_IXUSR S_IRUSR + S_IWUSR + S_IXUSR
as you cannot rely on S_I[RWX]USR being single-bit values.
Doesn't really seem relevant to the case at hand. By the way, addition and bitwise or are synonymous whenever a&b == 0, it has nothing to do with being single bit
On Fri, 8 Sep 2006, Anders Johansson wrote:
On Friday 08 September 2006 15:49, Jan Engelhardt wrote:
It becomes important as you write code:
S_IRUSR | S_IWUSR | S_IXUSR S_IRUSR + S_IWUSR + S_IXUSR
as you cannot rely on S_I[RWX]USR being single-bit values.
Doesn't really seem relevant to the case at hand.
i would have thought more important would be 1. how to not use 777 but maybe 755 or even less 2. distinguishing directory and file create masks (not every file must be executable) cheers
On Friday 08 September 2006 14:25, Jan Engelhardt wrote:
I have been using the following under the share definition.... all works great!
create mask = 0777 force create mode = 0777 dos filetimes = yes force directory mode = 0777
Seems to have done it, thanks
Let me show you how to catch a fish.
Let me show you how to correctly catch a fish.
The "r w x" in binary will have the values "4 2 1". So, "r w -" will have the values "4 2 -", that sums up to 6.
So again, "r w x" will be "4 2 1" = 4+2+1 = 7, hence the create mode 777
4 | 2 | 1 = 7
(a & b) == 0 => (a | b) == (a + b)
On Fri, 2006-09-08 at 14:25 +0200, Jan Engelhardt wrote:
I have been using the following under the share definition.... all works great!
create mask = 0777 force create mode = 0777 dos filetimes = yes force directory mode = 0777
Seems to have done it, thanks
Let me show you how to catch a fish.
Let me show you how to correctly catch a fish.
The "r w x" in binary will have the values "4 2 1". So, "r w -" will have the values "4 2 -", that sums up to 6.
So again, "r w x" will be "4 2 1" = 4+2+1 = 7, hence the create mode 777
4 | 2 | 1 = 7
Jan Engelhardt
Ye, thats more correct, but lets add or-ing to the next lesson E-Mail disclaimer: http://www.sunspace.co.za/emaildisclaimer.htm
participants (8)
-
Anders Johansson
-
engelbert.gruber@ssg.co.at
-
Hans van der Merwe
-
Jan Engelhardt
-
Peter Bloomfield
-
stephan beal
-
Tony Nichols
-
Vincenzo Ciancia