Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Apr 2009 15:21:29 -0400
From:      John Almberg <jalmberg@identry.com>
To:        John Almberg <jalmberg@identry.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Sorting out owner and group permissions...
Message-ID:  <B1750F7D-1AFA-436B-A63D-B246AD898B15@identry.com>
In-Reply-To: <1F1D939A-3787-4C5A-995B-93EDABF0BE5A@identry.com>
References:  <1F1D939A-3787-4C5A-995B-93EDABF0BE5A@identry.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Apr 20, 2009, at 2:48 PM, John Almberg wrote:

> I have a directory called 'scans' that is owned by 'master', but I  
> want to allow 'customer' to FTP images to that directory. This is  
> the way I have permissions set:
>
> # ls -l
> drwxrwxr-x  5 master  customer     251904 Apr 20 10:29 scans
>
> The problem is that when customer ftp's a file to the directory,  
> the permissions end up like this:
>
> -rw-r-----  1 customer customer  772584 Apr 20 15:28 image.jpg
>
> When a process run by 'master' tries to copy this file to another  
> directory (also owned by master), I get the following:
>
> # cp scans/image.jpg thumbs/image.jpg
> cp: scans/image.jpg: Permission denied
>
> The only solution that occurs to me smells like a newbie kludge: to  
> have a root cron job periodically chown all the images to  
> master:customer. This seems like the proverbial sledgehammer. There  
> must be a better way?
>
> Any thoughts, much appreciated!

Well, I did figure out one way that seems reasonable... since I am  
using pureftpd, I changed the upload mask in the pureftpd  
configuration so new files are created with permissions like:

-rw-r--r--  1 customer  customer   93177 Apr 20 20:12 image.jpg

This seems like a pretty good approach, but if there's a better one,  
I'm all ears!

-- John




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B1750F7D-1AFA-436B-A63D-B246AD898B15>