On Fri, Mar 13, 2009 at 11:40:58AM -0400, Dave Rutherford wrote:
> --- building
> $ gcc -fPIC -c -Wall sticky.c -o sticky.o
> $ gcc -shared sticky.o -ldl -lstdc++ -o sticky.so
> --- running
> $ export LD_PRELOAD=$PWD/sticky.so:$LD_PRELOAD
> --- for long-term use, add to bash startup files
>
> How
On Fri, Mar 13, 2009 at 9:30 AM, Greg Wooledge wrote:
> This still doesn't address the original poster's concerns if, for
> example, a web browser creates a new ~/.browserconf directory the first
> time it's invoked. But nothing bash can do will solve that.
True, but what about a wrapper?
--- s
On Thu, Mar 12, 2009 at 07:40:58PM -0700, Ian Kelling wrote:
> mkdir also has the -m argument, so you could do
> mkdir -m 1755 dir
Ah, clever. Then:
mkdir() {
command mkdir -m $(printf '%o\n' $((01777 - $(umask "$@"
}
This still doesn't address the original poster's concerns if, for
examp
Angel Tsankov wrote:
> Greg Wooledge wrote:
> Let's say that removing '-p' is straightforward, but what about setting the
> sticky bit to every newly created directory component?
>
mkdir also has the -m argument, so you could do
mkdir -m 1755 dir
interestingly -m does not apply to parent directo
Angel Tsankov wrote:
Greg Wooledge wrote:
Let's say that removing '-p' is straightforward, but what about setting the
sticky bit to every newly created directory component?
mkdir also has the -m argument, so you could do
mkdir -m 1755 dir
interestingly -m does not apply to parent directories
Greg Wooledge wrote:
> If you only ever create directories from interactive shells with
> the "mkdir" command, you could override it with a function:
>
> mkdir() {
> command mkdir "$@" &&
> chmod +t "$@"
> }
>
> (In reality you'd want to process function arguments, and remove for
> example a "-p"
On Thu, Mar 12, 2009 at 09:50:49AM +0200, Angel Tsankov wrote:
> What can I do so that every directory I create has the sticky bit set?
If you only ever create directories from interactive shells with
the "mkdir" command, you could override it with a function:
mkdir() {
command mkdir "$@" &&
Hello,
What can I do so that every directory I create has the sticky bit set?
Regards,
Angel Tsankov