Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 May 2012 17:43:26 +0200
From:      Polytropon <freebsd@edvax.de>
To:        fake fake <four.troublesome.heads@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: file permission template
Message-ID:  <20120512174326.62b4594f.freebsd@edvax.de>
In-Reply-To: <CA%2BrxiGDFQkMPk3NoW2OshvdOaZaKFsPM%2B7oCH0p3NzOkTuqxcA@mail.gmail.com>
References:  <CA%2BrxiGAGsZMh9sDQ8z4ZXBiMvYgXPdoUqZYLHrQoU5wW7HVEGQ@mail.gmail.com> <CAHu1Y73pSopNpcdMGX3b0Z=hoLwAfCKmON_irQUrRgjWzT%2BDBA@mail.gmail.com> <CA%2BrxiGDFQkMPk3NoW2OshvdOaZaKFsPM%2B7oCH0p3NzOkTuqxcA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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
home directory?


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

-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



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