[K12OSN] Need a script

Petre Scheie petre at maltzen.net
Tue Mar 1 20:52:49 UTC 2005


Wouldn't it be easier to use Apache's UserDir directive, in which each 
teacher has a ~/public_html/ directory which can be accessed by pointing 
one's web browser to website/~teachername?  That is, if the website is 
school.domain.org, and the teacher's name is smith, users can access 
smith's webpage by going to http://school.domain.org/~smith/.  And all 
smith has to do is put files in /home/smith/public_html.

Petre

Alan Hodson wrote:
> Hi folks
> 
> NEED: I am in dire need of a script that reads all users choosing only
> certain ones, then creates folders in the webserver area, set
> permissions and then creates a link back to the chosen user's home and
> renames it.
> 
> EXPLANATION: I have created accounts for all teachers on K12LTSP V.4.2
> servers (t.name##- a number based on the school code), and they all
> belong to a group called <tchr>
> 
> Manually, I am going into /var/www/html and creating a folder called
> t.name## (yes, one by one...). I then I set chmod 775 and chgrp tchr. I
> then make a link of this /var/www/html/t.name## and move it to the
> t.name## home area, where I rename it 'html' - this way, when a student
> types http://servername/t.name# they can see any and all documents that
> that teacher put in his/her <html> folder - I suggest to them to stay
> away from using index.html, as that turns off the listing of that
> 'storage/drop area'
> 
> I would like to see if a small script can a) read all user names and
> 'select' those ending with ## (school number, and only teachers) - b)
> create the folder in /var/www/html with that same name, c) set the
> permissions, d) make an alias of it in the original home directory and
> e) rename the alias to 'html', creating in effect a DROP FOLDER for all
> to see via the apache web server...
> 
> Thanks in advance
> Alan A Hodson
> TIS/EPISD
> http://links.episd.org/
> aahodson at episd.org
> -=o=- 
> 
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
> 




More information about the K12OSN mailing list