From b7f9a7ed05bbf9c7cd4eece5e92fb79dcc4dd3b0 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 25 Jul 2006 18:38:58 +0000 Subject: [PATCH] Clarify the "chmod 0500" news, and correct the vague statements about compatibility with BSD. --- ChangeLog | 7 +++++++ NEWS | 20 ++++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e69b91b..df81b96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-07-25 Paul Eggert + + * tests/cp/fail-perm: Use "chmod 0500" rather than "chmod 500". + Problem report and fix from Bob Proulx. + * NEWS: Clarify the "chmod 0500" news, and correct the vague + statements about compatibility with BSD. + 2006-07-25 Jim Meyering * src/ls.c (gobble_file): When handling a stat-failed entry, diff --git a/NEWS b/NEWS index aa7a616..976afca 100644 --- a/NEWS +++ b/NEWS @@ -26,13 +26,21 @@ GNU coreutils NEWS -*- outline -*- basename and dirname now treat // as different from / on platforms where the two are distinct. - chmod, install, and mkdir now leave a directory's set-user-ID and - set-group-ID bits alone unless you explicitly request otherwise. - This is for compatibility with BSD and other systems. For example, + chmod, install, and mkdir now preserve a directory's set-user-ID and + set-group-ID bits unless you explicitly request otherwise. E.g., `chmod 755 DIR' and `chmod u=rwx,go=rx DIR' now preserve DIR's - set-user-ID and set-group-ID bits instead of clearing them. If - you want to clear the bits you can mention them explicitly, e.g., - `chmod 0755 DIR' and `chmod a-s,u=rwx,go=rx DIR'. + set-user-ID and set-group-ID bits instead of clearing them, and + similarly for `mkdir -m 755 DIR' and `mkdir -m u=rwx,go=rx DIR'. To + clear the bits, mention them explicitly, e.g., `chmod 0755 DIR' or + `mkdir -m a-s,u=rwx,go=rx DIR'. This change is for convenience on + systems where these bits inherit from parents. Unfortunately other + operating systems are not consistent here, and portable scripts + cannot assume the bits are set, cleared, or preserved, even when the + bits are explicitly mentioned. For example, OpenBSD 3.9 `mkdir -m + 777 D' preserves D's setgid bit but `chmod 777 D' clears it. + Conversely, Solaris 10 `mkdir -m 777 D', `mkdir -m g-s D', and + `chmod 0777 D' all preserve D's setgid bit, and you must use + something like `chmod g-s D' to clear it. `cp --link --no-dereference' now works also on systems where the link system call cannot create a hard link to a symbolic link. -- 2.7.4