Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 May 2012 11:22:53 -0500 (CDT)
From:      Robert Bonomi <bonomi@mail.r-bonomi.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: file permission template
Message-ID:  <201205121622.q4CGMrxH045913@mail.r-bonomi.com>
In-Reply-To: <CA%2BrxiGAGsZMh9sDQ8z4ZXBiMvYgXPdoUqZYLHrQoU5wW7HVEGQ@mail.gmail.com>

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

> 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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205121622.q4CGMrxH045913>