From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.62) (envelope-from ) id 1Hu52E-000452-7l for garchives@archives.gentoo.org; Fri, 01 Jun 2007 11:11:10 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l51B9oX2023104; Fri, 1 Jun 2007 11:09:50 GMT Received: from cranium.sybase.co.za (sqlprd.sybase.co.za [192.96.139.1]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l51B5W2L018453 for ; Fri, 1 Jun 2007 11:05:33 GMT Received: from localhost (cranium.sybase.co.za [127.0.0.1]) by cranium.sybase.co.za (Postfix) with ESMTP id E319783450 for ; Fri, 1 Jun 2007 13:16:18 +0200 (SAST) X-Virus-Scanned: amavisd-new at sybase.co.za Received: from cranium.sybase.co.za ([127.0.0.1]) by localhost (cranium.sybase.co.za [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R-XsBLPrgxHG for ; Fri, 1 Jun 2007 13:16:13 +0200 (SAST) Received: from bard.sybase.co.za (bard.sybase.co.za [192.168.2.6]) by cranium.sybase.co.za (Postfix) with ESMTP id 1FB318344F for ; Fri, 1 Jun 2007 13:16:13 +0200 (SAST) Received: from nazgul.sybase.co.za ([192.168.2.68]) by bard.sybase.co.za with Microsoft SMTPSVC(6.0.3790.1830); Fri, 1 Jun 2007 13:07:13 +0200 From: Alan McKinnon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] File permissions and such Date: Fri, 1 Jun 2007 13:03:22 +0200 User-Agent: KMail/1.9.6 References: <200706031436.13432.danthehat@gmail.com> In-Reply-To: <200706031436.13432.danthehat@gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200706011303.22678.alan@linuxholdings.co.za> X-OriginalArrivalTime: 01 Jun 2007 11:07:14.0171 (UTC) FILETIME=[0249F4B0:01C7A43D] X-Archives-Salt: cb002d8c-3658-4944-8cbd-2ea139332742 X-Archives-Hash: d871537941b351e5744d6bcf226eee5e On Sunday 03 June 2007, Dan Cowsill wrote: > Hey list, > > It has been a constant burden to me to have to change the file > permissions of files I've copied so that other users can access them > and modify them. Say I have a number of documents in the /root > folder which the root user owns. Now I want to transfer them to my > non-priveliged user so I can work on them... But I have to chown them > so that is possible. > > It just occured to me that there must be an easier way to do things > like this and I was wondering if you fine fellows could guide me down > the right path. A custom script? Maybe something like (named as chowncp) #!/bin/bash # chown $1 $2 cp $2 $3 Permissions would be something like x only for owner (root), called something like this: chowncp dan It's way incomplete, I'll let you figure out your own '[ -f ...' checks but you get the idea. I'm also sure ext3/reiser acls can force ownership of new files (it can do it for groups), but I'm way too lazy to figure it out right now, it being Friday and all... alan -- Optimists say the glass is half full, Pessimists say the glass is half empty, Developers say wtf is the glass twice as big as it needs to be? Alan McKinnon alan at linuxholdings dot co dot za +27 82, double three seven, one nine three five -- gentoo-user@gentoo.org mailing list