Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help, how can I setup each user's cgi-bin directory's umask to rwx--x--x?

1 view
Skip to first unread message

nkl

unread,
Jan 30, 2001, 1:18:26 AM1/30/01
to
Hello

I install proftpd rc2 in redhat7.0.

I setup the proftpd・s umask 022 for each user.

It is because my system support cgi-bin for each user, how can I
setup each user・s cgi-bin directory・s umask to rwx--x--x?

For example

<User a's home directory> ---> I use umask 022 => it produce rw-r--r--

|

-----<subdirectory cgi-bin> --> I use umask ??? => in order to
produce rwx--x--x

Thanks you for your help.

Angry Bob

unread,
Jan 30, 2001, 10:11:50 AM1/30/01
to
What would you like to read? [comp.os.linux.security or *?]

This is a nkl <s905...@netvigator.com> scroll! it says:

> It is because my system support cgi-bin for each user, how can I
> setup each user's cgi-bin directory's umask to rwx--x--x?

I'm not sure if I'm totally understanding the question, but you can try
this:


su
cd /home
for i in `ls`
do
cd $i/public_html
chmod 711 cgi-bin
cd ..
done


I can think of at least a handful of other ways to do it....

--
AngryBob
headline: Microsoft hacked in the Balkans
-- www.securityfocus.com 12-15-2000

Tim Haynes

unread,
Jan 30, 2001, 10:18:07 AM1/30/01
to
Angry Bob <angr...@havoc.gtf.org> writes:

> su
> cd /home
> for i in `ls`
> do
> cd $i/public_html
> chmod 711 cgi-bin
> cd ..
> done
>
> I can think of at least a handful of other ways to do it....

Me too, of course. Some decidedly preferable ones:

sudo bash
cd /home
for i in *
do
(cd $i/public_html; chmod 711 cgi-bin)
done

(I've found the subshell approach to be more reliable than "cd .."
afterwards.)

Or just:

cd /home
sudo chmod 711 */public_html/cgi-bin

~Tim
--
And the past is sudd'nly the part |pig...@glutinous.custard.org
Of life you throw away |http://piglet.is.dreaming.org

Angry Bob

unread,
Jan 30, 2001, 10:37:11 AM1/30/01
to
What would you like to read? [comp.os.linux.security or *?]
This is a Tim Haynes <pig...@glutinous.custard.org> scroll! it says:

> Or just:
> cd /home
> sudo chmod 711 */public_html/cgi-bin

I like that one.... <smile>

--
AngryBob
You've never eaten a packing peanut?
--Nick Black

0 new messages