file permission template
freebsd at edvax.de
Sat May 12 15:43:27 UTC 2012
On Sun, 13 May 2012 00:15:54 +0900, fake fake wrote:
> Thanks. But I need specific directory only.
> umask way seems to set mode not only under ~/secret but other
> directories like ~/public.
You're sure you want to have something _public_ in your
> Is there any elegant way?
Depends on how the files are created. A possibility is to
set umask prior to creating files, and resetting it to its
previous value when being done. If files are created
automatically, this could be done by a shell script. Such
a script could also be used to "copy to secure directory",
performing the cp and the chmod step.
However, is there any problem _for your particular case_
that setting secret/ to rwx/-/- only, and leaving the
files inside with the default umask rw/r/r?
Maybe there really is a more elegant way.
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions