From owner-freebsd-questions@FreeBSD.ORG Thu Nov 25 20:00:23 2010 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 1FA0E106566B for ; Thu, 25 Nov 2010 20:00:23 +0000 (UTC) (envelope-from dave@g8kbv.demon.co.uk) Received: from lon1-post-1.mail.demon.net (lon1-post-1.mail.demon.net [195.173.77.148]) by mx1.freebsd.org (Postfix) with ESMTP id D1CF58FC13 for ; Thu, 25 Nov 2010 20:00:22 +0000 (UTC) Received: from [212.225.127.64] (helo=[192.168.33.1]) by lon1-post-1.mail.demon.net with esmtpa (AUTH g8kbv) (Exim 4.69) id 1PLhzR-000077-YY for freebsd-questions@freebsd.org; Thu, 25 Nov 2010 20:00:21 +0000 From: "Dave" To: freebsd-questions@freebsd.org Date: Thu, 25 Nov 2010 20:00:21 -0000 MIME-Version: 1.0 Message-ID: <4CEEC055.15679.45A559A8@dave.g8kbv.demon.co.uk> Priority: normal In-reply-to: References: <4CED8855.23373.40E2965D@dave.g8kbv.demon.co.uk>, X-mailer: Pegasus Mail for Windows (4.52) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Subject: Re: new user questions. (Before I back myself into a corner!) 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, 25 Nov 2010 20:00:23 -0000 On 25 Nov 2010 at 9:42, Nathan Vidican wrote: Trimmed... > > Two commands of interest here, 'chmod' and 'chown'. I'd highly suggest > reading the manpage on both, but here's the short/quick-start version: > > chmod > - used to change permissions for a file or directory > - permissions are broken down into: 2=read, 4=write, 1=execute > - permissions are displayed in group of three, corresponding to > owner-group-everyone else > - so chmod 666 means "make owner,group,everyone each able to read(2) > plus > write(4) (2+4=6) > - the first number indicating the owner of the files permission, > the > second the group, and the last everyone > - so when you noted seeing "drwxr-xr-x" - that's 755 (owner > read+write+execute(7), group read+execute (5), everyone else > read+execute(5) > - in order for a user to 'cd' to a directory, the execute permission > must > be set > - to answer your original question then, "chmod 775 " would > then > change the permissions to that the group can write as well > > chown > - used to change ownership of a file or directory > - can change owner, or group ownership > - syntax is "chown user:group " > > As far as the FTP thing goes, you need to make sure that the shell you > assign the user is listed in /etc/shells - that's what the system > 'standard' ftpd is looking for. > > -- > Nathan Vidican > nathan@vidican.com > Thanks Nathan. Following your lead, and after some more reading, I seem to have it working as I want. That execute permission bit, is a doozie. If you hadn't said it's needed for the user (or group member) to be able to 'cd' to that directory, I'd have been there for hours. Lots is written about the 'x' bit, and allowing execution of a file, but not that it affects the ability to even use that directory. I guess in this context, "using" = "executing", so it sort of makes sense. I did find though, that the -R switch, doesn't always cause chmod to alter sub directories in the way one expects. One directory at a time then, but job done. It appears too, that if one of the group members then creates a new direcory, that inherits the permissions of the parent directory. Next task, to get the ftp server to work on another port. I might just quit while ahead, and go up the pub though, and leave that till tomorrow. Thanks again. Dave.