From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Tue, 24 Feb 2004 19:25:31 +0000 Subject: Re: [Q: udev] chmod required? Message-Id: <20040224192531.GA452@kroah.com> List-Id: References: <200402241951.10052.mbuesch@freenet.de> In-Reply-To: <200402241951.10052.mbuesch@freenet.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Tue, Feb 24, 2004 at 08:17:04PM +0100, Michael Buesch wrote: > Hi, > > Why do we chmod() after mknod() in make_node() ? > Mode is passed as arg1 to mknod(). As I understand > the glibc documentation, this should be enough to set > the file-mode, isn't it? Unfortunatly no. The line in the man page to pay attention to is: The permissions are modified by the process's umask in the usual way: the permissions of the created node are (mode & ~umask). That umask logic just messed with everything. By explictly setting it with chmod() we solve the problem. See the old changelog entries for more details on me struggling with this :) thanks, greg k-h ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id56&alloc_id438&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel