From owner-freebsd-questions@FreeBSD.ORG Thu Dec 22 18:14:21 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC96F106566B for ; Thu, 22 Dec 2011 18:14:21 +0000 (UTC) (envelope-from admin_freebsd@cyanide-studio.com) Received: from mail.cyanide-studio.com (mail.cyanide-studio.com [195.66.80.226]) by mx1.freebsd.org (Postfix) with ESMTP id 361128FC16 for ; Thu, 22 Dec 2011 18:14:21 +0000 (UTC) Received: from localhost (unknown [10.1.8.14]) by mail.cyanide-studio.com (Postfix) with ESMTP id 786BE17BF4D1 for ; Thu, 22 Dec 2011 18:57:16 +0100 (CET) Received: from mail.cyanide-studio.com ([10.1.8.3]) by localhost (mailguard.cyanide-studio.com [10.1.8.14]) (amavisd-maia, port 10024) with ESMTP id 07287-09 for ; Thu, 22 Dec 2011 18:57:16 +0100 (CET) Received: from [10.1.8.96] (unknown [10.1.8.96]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: bsemene@cyanide-studio.com) by mail.cyanide-studio.com (Postfix) with ESMTP id 3F5F417BF4CB for ; Thu, 22 Dec 2011 18:57:16 +0100 (CET) Message-ID: <4EF36FA9.9020908@cyanide-studio.com> Date: Thu, 22 Dec 2011 18:58:01 +0100 From: Bastien Semene Organization: Cyanide S.A. User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: umask not applied X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 18:14:21 -0000 Hi list, I'm trying to apply a umask of "002" to user "user" (username changed for this example) while logged-in through ftpd. I used login class "class" (class name changed for this example) I edited /etc/login.conf and set at the bottom (there's no other entry for this user): class::umask=0002: then rebuilt the db : #cap_mkdb /etc/login.conf I assigned the user to this class: #pw usermod user -L class #pw usershow user user:*:1003:80:class:0:0:bla bla:/home/user:/bin/sh (group 80 is why I need this umask) The user still creates folders with 755 permissions through ftpd. So I switched to this user and watched the umask, it is still 0022. I tried setting the umask on the fly : $umask 0002 It works. There's no user-defined umask in ~/.login or ~/.login_conf I took care of typos and there is no error. #uname -r 8.2-RELEASE-p3 As what I read in the man pages I checked all the possibilities in the login mechanism, so if anyone has an idea it's welcome :) Thanks !