Update:

This effect only seem to happen if the file's name begins with a dot, e.g.
".secretfile"
It does not happen for "secretfile" as I have previously claimed.

-----Original Message-----
From: Panko, Kevin [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 15, 2004 10:55 AM
To: [EMAIL PROTECTED]
Subject: RE: [Samba] permission bits clobbered


The '>' creates a new file, but ONLY if the file did NOT exist before.  If
it does exist, the file's contents are replaced, but it still the same file.

This is the way it works on both Windows and Unix.
This command:
echo foobar > secretfile
Does not clobber the permissions (or NTFS ACLs) on Unix (or Windows).
But it does clobber them when Samba is involved.

It makes no sense to say that the act of editting a text file has any effect
on its security permissions.  (Whether it be in notepad.exe or on the
command line as I have shown.)

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 15, 2004 3:40 AM

Of course '>' is very different of '>>'. '>' creates a new file so THE 
NEW secretfile is created with the 644 mask.
'>>' appends in the file. 

> A file is chmod 600.  It gets opened on Windows, and it gets 
> changed to 644.
> This happens if the user does:
> N:\> echo foobar > secretfile
> But it does stay at chmod 600 if he does (append instead of truncate):
> N:\> echo foobar >> secretfile
> The "create mask" parameter is set to 644.  I do not think this 

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba

Reply via email to