From owner-freebsd-questions@FreeBSD.ORG Sat Apr 17 02:03:30 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4CE416A4CE for ; Sat, 17 Apr 2004 02:03:30 -0700 (PDT) Received: from dyer.circlesquared.com (host217-45-219-83.in-addr.btopenworld.com [217.45.219.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2C3443D5C for ; Sat, 17 Apr 2004 02:03:23 -0700 (PDT) (envelope-from peter@circlesquared.com) Received: from circlesquared.com (localhost.petanna.net [127.0.0.1]) i3H97vdu065076; Sat, 17 Apr 2004 10:08:10 +0100 (BST) (envelope-from peter@circlesquared.com) Message-ID: <4080F3ED.7020408@circlesquared.com> Date: Sat, 17 Apr 2004 10:07:57 +0100 From: Peter Risdon User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7b) Gecko/20040327 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Anthony carmody References: <4080E09D.5030601@carmoda.com> <4080E48A.7040201@circlesquared.com> <4080E845.5010701@carmoda.com> In-Reply-To: <4080E845.5010701@carmoda.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: question about SAMBA shared directory and file permissions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2004 09:03:31 -0000 Anthony carmody wrote: > > > Peter Risdon wrote: > >> freebsd.org@carmoda.com wrote: >> >>> Hi, >>> >>> i have been having problems with a SAMBA shared directory and user >>> permissions. My smb.conf file is simple and allows for members of >>> 'wwwdev' access the directory, and they can when i test it, but we >>> get all kinds of problems with the permissions on various files and >>> directories: >> >> >> >> >> It would help if you said exactly what those problems are. > > > sure. i realised i didn't explain just after i sent the mail. doh! > > ok: i want really open access 'a-la-windows' style to all files under > a certain directory tree to users in a particular group. at the > moment, i am having to chown all files over to whom ever is editing > them at any given time. I was thinking more of what happens to file permissions when a file is accessed by a samba user. Say they start at something like: #ls -l -rwxrw-r-x 1 pwr wwwdev 637 Apr 17 09:01 testfile So all members of the wwwdev group have write permission. After access by user pwr do they change? Maybe to: -rwxrw-r-x 1 pwr pwr 637 Apr 17 09:01 testfile > >>> >>> ////////////////////////////////////////////////////// >>> [wwwdev] >>> comment = Virtual Web Servers HTTP dirs >>> path = /usr/wwwdev >>> create mode = 0765 >>> valid users = @wwwdev >>> ////////////////////////////////////////////////////// >> >> >> >> >> You might also need to set the directory mode on the share. > > > cool, what would you suggest? See below. > >>> >>> >>> i assume this is a ownership issue on the unix file system side, >>> although i have opened up the permissions to 'pants down in public' >>> level .... >>> >>> drwxrwxrwx >>> -rwxrwxrwx >> >> >> >> >> So, what is the problem? Do these permissions and/or the file >> ownerships get altered when accessed by a Windows client? > > > i would have assumed that because the two users were in the same group > they could access the same files in turn without chown-ing. There's a useful guide to configuring samba at: http://hr.oregon.edu/davidrl/samba/server.html And it deals with a similar configuration to the one you're seeking. But working on a guess that your problem stems from the group flag of a file being changed to that of the user who accesses it, you might try adding: create mode 0774 # Windows clients that seems to require the extra bit directory mode = 0775 #so that new directories are created with the right permissions force group = +wwwdev # so that all file activity is carried out as this user HTH. PWR