Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 May 2012 12:45:54 -0700
From:      Chuck Swiger <cswiger@mac.com>
To:        Paul Halliday <paul.halliday@gmail.com>
Cc:        questions@freebsd.org
Subject:   Re: Write only directory.
Message-ID:  <E4A603EC-1FE8-4CAC-980F-A97B12A8B919@mac.com>
In-Reply-To: <CAJfn-REgWrEP-g9uAxGOpsvt8SxuKOf_xXr=5iy4SahP0cpvoA@mail.gmail.com>
References:  <CAJfn-REgWrEP-g9uAxGOpsvt8SxuKOf_xXr=5iy4SahP0cpvoA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On May 7, 2012, at 11:38 AM, Paul Halliday wrote:
> Is it possible to let a user write to a directory but not access the
> file after they write it?
> 
> The file is being transferred via scp and after the transfer I don't
> want them to be able to re-fetch or even get a directory listing.

A directory with 0300 / 0330 umask permissions will prevent directory listing, but if they know the filename, they can still read from it as a necessary consequence of being able to write to it (think of appending data).

It sounds like you are trying to implement the SFTP equivalent of an FTP incoming upload dropbox, so the comments in "man ftpd" might be helpful.  However, it might be easier to setup a cronjob every minute which moves any files in the dropbox location to some other place for review and processing, which will prevent read access as well as making directory listings moot.  (People offering anonymous FTP incoming tend to do this, even if their ftpd offers support for blocking read access for anonymous users, etc...)

Regards,
-- 
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E4A603EC-1FE8-4CAC-980F-A97B12A8B919>