PaulW
Member
Registered: 26th Jan 03
Location: Atherton, Greater Manchester
User status: Offline
|
I'm after a PHP-Script or similiar to run on a unix web server, which lets people sign up for free hosting on the server, so when they sign up & stuff, the script then adds a user to the system, so they have there own little space like at like www.myhostserver.com/~username (as will be configured using apache...
Simple way of explaining...
User visits site & registers
Once registered, PHP Script creates a user account on the UNIX webserver (with a default group setting for quota management & so on), creates a folder called public_html in there home directory (/home/username/public_html) and configures it all so they can FTP into the server with there username/password to upload files...
|
Ian
Site Administrator
Registered: 28th Aug 99
Location: Liverpool
User status: Offline
|
I *think* thats as difficult as manually writing lines in each appropriate config file, as well as setting up the appropriate folders etc. and changing permissions on them. All fairly simply file handling or system call stuff although I'd have to do some homework on exactly what's required to write one.
I dare say such a script exists - you tried DevShed?
|
BabyBlade
Member
Registered: 5th Feb 03
Location: Hereford Rides: Ninja 600
User status: Offline
|
My heads hurting now ive read all that
Good luck tho!
|
PaulW
Member
Registered: 26th Jan 03
Location: Atherton, Greater Manchester
User status: Offline
|
quote: Originally posted by Ian
I *think* thats as difficult as manually writing lines in each appropriate config file, as well as setting up the appropriate folders etc. and changing permissions on them. All fairly simply file handling or system call stuff although I'd have to do some homework on exactly what's required to write one.
I dare say such a script exists - you tried DevShed?
folders & so-on will be pre-defined so the script just copies whats what to the new user home folder, as for permissions, could I not just call chmod from within the script or set it within the guid?
|
Ian
Site Administrator
Registered: 28th Aug 99
Location: Liverpool
User status: Offline
|
One problem you might have with creation of the directories isn't mode, its ownership. The web server process will definately be able to chmod stuff its created but you really want a chown so its consistent with ftp user, not just owned by web server process and wide open.
|
PaulW
Member
Registered: 26th Jan 03
Location: Atherton, Greater Manchester
User status: Offline
|
hmmm tru cos then when they ftp in, it just lists what they got permission to view, so they canae mess about
|
willay
Moderator Organiser: South East, National Events Premium Member
Registered: 10th Nov 02
Location: Roydon, Essex
User status: Offline
|
uh if you have root on the machine the script could add users to the system but not give them a working shell so they cannot login, but still have ftp access by the stock ftpd, webspace via apache (IIRC theres a setting so in each user home area, if it has a public_html or simular then it links to www.website.com/~username or kinda leike that, hard to explain!)
then theres security issues but I'm not going into that.
|
Trucido
Member
Registered: 14th Jun 03
Location: Bristol
User status: Offline
|
to be honest if you have it on a form you will get spammed by some git...its best to set up a form that either e-mails you or lists on the site in a aadmin area then you can verify it and create it yourself
|