On Thu, 16 Dec 2004 18:13:00 -0800 (PST), Harold Harvey
<[EMAIL PROTECTED]> wrote:
> how can apache be configured so that it could be
> used to view the files uploaded by my students (im a
> teacher, can u believe that?) using ftp in their own
> accounts?
1. where are those files located? on the user's
public_html directory? or are you going to read them
from anywhere in the user's home directory. i suggest
the second. that way, the students can keep private
files (e.g., mail directories, etc) private and any
public files go into their public_html directory.
2. users will probably forget to make the files in public_html
rx for the apache user (or rwxr-xr-x if apache runs
as nobody), so you can set up a cron job that goes
through the home directory and sets permissons for
all public_html directories to rwxr-xr-x so apache can
read it, or, if apache runs as user apache or www or
something else, you can chown the public_html
directories so apache can read them, e.g.,
#!/bin/bash
cd /home
for user in *
do
if [ -d $user ]
then
if [ -d $user/public_html ]
then
chown -R $user.apache $user/public_html
chmod -R u+rwx,g+rx $user/public_html
fi
fi
done
and then you run that as a cron job as root. NOTE:
i didn't test that. test it (but echo the chown and chmod,
so they don't actually get executed, just displays what
it would do) first.
tiger
--
Gerald Timothy Quimpo http://bopolissimus.sni.ph
[EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]
Public Key: "gpg --keyserver pgp.mit.edu --recv-keys 672F4C78"
Mene sakhet ur-seveh
--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie