file permission template

Robert Bonomi bonomi at
Sat May 12 16:21:30 UTC 2012

> I need a sort of file permission template.
> Under some particular directory (like ~/secret), I need all those
> files (including newly creating one) mode 700.
> Is there any template-trick? Or "chmod -R 700" every time?

As usual, 'insufficient data'.  created 'by whom', and 'how'?

some starting points:
  a) 'man umask'.
  b) 'man 2 chmod',
  c) see also how the 'setuid' bit works on directories

note if '~/secret' is mode 700, no one other than the owner can list the
files in it (or any subdirectory), nor can they use it in a path name.

Is this sufficient?  If not, exactly _what_ are you trying to accomplish?

More information about the freebsd-questions mailing list