At 05:08 PM 9/23/2002 -0700, you wrote:
ls -R | grep :$ | sed 's#:$##' | awk '{print \$0\}' | xargs
chmod g+s
Could I use something like this to set the proper ownership of a directory as
well?
I have copied all the user accounts from the BSDI machine to the Mandrake
box, then I used a
Scott,
At 05:08 PM 9/23/2002 -0700, you wrote:
ls -R | grep :$ | sed 's#:$##' | awk '{print \$0\}' | xargs
chmod g+s
Could I use something like this to set the proper ownership of a directory as
well?
I have copied all the user accounts from the BSDI machine to the Mandrake
box,
For your example, I think this will work for you
grep /home/ /home/scott/homedirpass \
| awk -F: '{ print $1 $4; }' \
| while read pwuser pwgid ; do \
[ -d ~$pwuser ] || ( chown -R $pwuser.$pwgid
~$pwuser ) \
done
Any new subdirectories created by the users will automatically have the
sgid bit set. Unfortunately, it's not simple to automatically recurse
all the directories and set the sgid bit. But a oneline bash command
will do it for you:
ls -R | grep :$ | sed 's#:$##' | awk '{print \$0\}' |
Daniel Woods wrote on Tue, Sep 24, 2002 at 10:46:22AM -0600 :
all the directories and set the sgid bit. But a oneline bash command
will do it for you:
ls -R | grep :$ | sed 's#:$##' | awk '{print \$0\}' | xargs chmod g+s
Work through the logic and it will start to make sense. The
At 05:08 PM 9/23/2002 -0700, you wrote:
Assuming that you use user apache and group apache to run the webserver:
chmod -R 750 /usr/www
chgrp -R apache /usr/www
chmod g+s /usr/www
chmod g+s /usr/www/*
But you better make damn sure that apache can read those files before
you consider
Daniel Woods wrote on Tue, Sep 24, 2002 at 10:46:22AM -0600 :
all the directories and set the sgid bit. But a oneline bash command
will do it for you:
ls -R | grep :$ | sed 's#:$##' | awk '{print \$0\}' | xargs chmod g+s
Work through the logic and it will start to make sense.
Daniel Woods wrote on Tue, Sep 24, 2002 at 01:58:42PM -0600 :
find /var/www -type d -exec chmod g+s {} \;
Does it work if the directory name or path contains spaces? I am unable
to test at the moment (short on time).
Yes.
I tested and verified that it does work. But I have one
I am hosting about 100 web sites on a Mandrake 8.2 server and have a best
practices question regarding the directories.
I have them set up as follows:
/usr/www/site1
/usr/www/site2
etc
Most of the sites are ones that the user updates themselves. When I
create an account for them I use the
Scott wrote on Mon, Sep 23, 2002 at 07:35:12PM -0400 :
Most of the sites are ones that the user updates themselves. When I
create an account for them I use the web space for their home directory so
when they log in they are right in the directory. My question's are:
1)Is this cool or
Hi, try setting the files to 600. That makes them specifically viewable to
one user.
In case of perl scripts, etc, you might want 700 instead.
- Original Message -
From: Scott [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 23, 2002 7:35 PM
Subject: [expert] Virtual
11 matches
Mail list logo