[Samba] permission bits clobbered
kevin.panko at pw.utc.com
Fri Jan 16 18:58:23 GMT 2004
This effect only seem to happen if the file's name begins with a dot, e.g.
It does not happen for "secretfile" as I have previously claimed.
From: Panko, Kevin [mailto:kevin.panko at pw.utc.com]
Sent: Thursday, January 15, 2004 10:55 AM
To: samba at lists.samba.org
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.
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.)
From: juanjo.carel at ono.com [mailto:juanjo.carel at ono.com]
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
More information about the samba