For the record, the solution is
1) add this line to each ====share definition==== in /etc/smb.conf
create mask = 0765
2) add this to /etc/profile
umask 0
(you may have to # the line <umask 022>)
Newly created files will have -rwxrw-r-- permissions. Old files need to be
"chmod"ed.
Don't quite understand why yet but thanks to Lawson and Nicholas.... and
to burning some midnight oil. Thanks all.
Shaggy
At 00:02 19/2/99 +0000, Lawson A. Whitney wrote:
>Shaggy,
>
>I don't know samba, but the only way I can make a file change ownership
>by being accessed like that is to access it by [copying it to a
>tempfile] deleting it, recreating it and [copying back the contents].
>And user2 seems to need write permission to access it...If this be so,
>and you are content that it be so, you just want the permissions to
>stay the same, try setting the samba users' umask value to 0. How to
>do this I don't know. If bash is involved, umask is generally set to
>022 in /etc/profile (all users) or can be changed in ~/.bash_profile
>(login shells) or ~/.bashrc (other shells, I think). 022 causes any
>file to be created with g-w and a-w. There is a man page, I think.
>Perhaps samba has a profile or login rc file where you could set it.
>There is a place to set it in /etc/passwd (man 5 passwd) but I couldn't
>see that that actuallly did anything. Or you could try grepping for
>umask in the samba files.
>
>Lawson
> >< Microsoft free environment
>
>This mail client runs on Wine. Your mileage may vary.
>
>On Fri, 19 Feb 1999 08:28:27 +0700 Shaggy Im-erbtham
><[EMAIL PROTECTED]> writes:
>> This is a snip from my smb.conf file
>> ====share definations ====
>> [shared]
>> path = /home/shared
>> public = no
>> browseable = no
>> writable = yes
>> printable = yes
>> read only = no
>>
>> At prompt, typing "ls -l /home/shared," I get
>> -rwx r- - r- - 1 user1 users size date time
>> filename.xls (this is a MS Excel file)
>> (at this point, user2 can "read only" the file)
>>
>> Then by the command "chmod a+rwx filename.xls" , I get
>> -rwx rwx rwx 1 user 1 users size date time
>> filename.xls
>>
>> Now, after user2 accesses the file, the command "ls -l /home/shared"
>> yields
>> -rwx r- - r- - 1 user2 users size date time
>> filename.xls
>> (user1 now can "read only" the file)
>>
>> A bit confusing but how can get the "chmod" command to be permanent,
>> i.e.
>> rwx for both user1 and user2? I even tried "chmod a+rwx /home/shared"
>> but
>> same result.
>>
>> TIA,
>> Shaggy
>> Bangkok, Thailand
>>
>>
>>
>>
>
>___________________________________________________________________
>You don't need to buy Internet access to use free Internet e-mail.
>Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
>or call Juno at (800) 654-JUNO [654-5866]
>