From owner-freebsd-questions@FreeBSD.ORG Sat Jan 10 01:23:35 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCB398BC for ; Sat, 10 Jan 2015 01:23:35 +0000 (UTC) Received: from be-well.ilk.org (be-well.ilk.org [23.30.133.173]) by mx1.freebsd.org (Postfix) with ESMTP id A48BDAE7 for ; Sat, 10 Jan 2015 01:23:35 +0000 (UTC) Received: from lowell-desk.lan (lowell-desk.lan [172.30.250.41]) by be-well.ilk.org (Postfix) with ESMTP id 4EF5433C1D; Fri, 9 Jan 2015 20:16:59 -0500 (EST) Received: by lowell-desk.lan (Postfix, from userid 1147) id 9853839813; Fri, 9 Jan 2015 20:16:58 -0500 (EST) From: Lowell Gilbert To: Jungle Boogie Subject: Re: Unix copy to different groups help request References: <54B07564.4000504@gmail.com> Reply-To: "freebsd-questions\@freebsd.org" Date: Fri, 09 Jan 2015 20:16:58 -0500 In-Reply-To: <54B07564.4000504@gmail.com> (Jungle Boogie's message of "Fri, 09 Jan 2015 16:42:12 -0800") Message-ID: <44oaq7bfjp.fsf@lowell-desk.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: "freebsd-questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2015 01:23:35 -0000 Jungle Boogie writes: > Hello Friends, > > This just in: computers always do what you tell them to do! > > Now you great people: please teach me so I can tell my computer what > I'm trying to do. > > Objective: cp file to /usr/local/www/data for lighttpd without using > sudo all the time. > > Problem: It seems like I have the right group everywhere: file, > /usr/local /usr/local/www and I'm in that group, too. > > > User: jboogie > % id > uid=1007(jboogie) gid=1008(jboogie) > groups=1008(jboogie),0(wheel),5(operator),80(www),1002(usb) > > > % ls -l /usr/local/ > drwxr-xr-x 4 root wheel 512 Jan 5 17:19 www > > % sudo chown www:www /usr/local/www > > % ls -l /usr/local > drwxr-xr-x 4 www www 512 Jan 5 17:19 www > > % ls -l /usr/local/www/ > total 8 > drwxr-xr-x 2 www www 512 Jan 9 14:54 data Note the permissions. The group permissions do not include write. Only the user "www" may write to that directory. You are not user "www". Therefore, you may not write to that directory. If you want being in group "www" to be sufficient to be allowed to write to that directory, you need to "chmod g+w /usr/local/www/data"