Write only directory.

Chuck Swiger cswiger at mac.com
Mon May 7 20:46:14 UTC 2012

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...)


More information about the freebsd-questions mailing list