From: Daniel Kelley Date: 2003-08-30T06:19:45+09:00 Subject: Re: File.chown removes setuid permission >>>>> "Andrew" == Andrew Walrond writes: Andrew> Is this behaviour deliberate, or a bug? The chown binary Andrew> from gnu coreutils does not do this. You don't say what platform you are running on, but "man 2 chown" on my RH8 box says (in part): When the owner or group of an executable file are changed by a non- super-user, the S_ISUID and S_ISGID mode bits are cleared. POSIX does not specify whether this also should happen when root does the chown; the Linux behaviour depends on the kernel version. In case of a non- group-executable file (with clear S_IXGRP bit) the S_ISGID bit indi- cates mandatory locking, and is not cleared by a chown. so Ruby is just doing what the system call does. d.k. -- Daniel Kelley - San Jose, CA For email, replace the first dot in the domain with an at.