Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 May 2012 17:17:58 +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:  <20120512171758.c83218f2.freebsd@edvax.de>
In-Reply-To: <CA%2BrxiGAGsZMh9sDQ8z4ZXBiMvYgXPdoUqZYLHrQoU5wW7HVEGQ@mail.gmail.com>
References:  <CA%2BrxiGAGsZMh9sDQ8z4ZXBiMvYgXPdoUqZYLHrQoU5wW7HVEGQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 12 May 2012 23:37:00 +0900, fake fake wrote:
> 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?

Depending on your shell, there is a "umask" command that
can be used as a "template". For example, if you're using
the default dialog shell csh, put the required "umask <value"
into ~/.cshrc. Note that this will cause _all_ file creations
by that user to have that predefined value.

See "man csh" for details. (In case you're using bash or a
different shell, consult the respective documentation.)


-- 
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?20120512171758.c83218f2.freebsd>