Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Jon Blakely on July 25, 2002, 06:49:27 PM
-
Mini How to for creating user web space (should work on all versions)
You want to allow your users to have public web space accessable by
http://www.your_domain/~user_name
Download http://khunjarnet.com/downloads/user-web-space/e-smith-user-webspace-0.1-3.noarch.rpm
This rpm by Damien Curtain will install the custom templates required (Damien if you read this can you supply your src and I will update the rpm and create a panel)
# rpm -ivh e-smith-user-webspace-0.1-3.noarch.rpm
answer yes to the question
# mkdir /etc/e-smith/skel/user/home/public_html
# pico /etc/e-smith/events/actions/user-create-unix
find the line that says
chmod 0700, "/home/e-smith/files/users/$userName";
and change to
chmod 0755, "/home/e-smith/files/users/$userName";
^x to exit and save
you can put a default index.html in /etc/e-smith/skel/user/home/public_html
that will appear in the users webspace when the user is created
Note: this will only create user webspace for new users. Existing users
will need to be created by hand.
If at any stage you want to disable user webspace
# /sbin/e-smith/config set UserPublicWeb off
# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
# service httpd restart
or to re-enable
# /sbin/e-smith/config set UserPublicWeb on
# /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
# service httpd restart
Usual disclaimer: You are responsible for any changes you make to your server.
Jon
-
Jon Blakely wrote:
>
> Note: this will only create user webspace for new users.
> Existing users
> will need to be created by hand.
What exactly has to be done for this, for us Linux newbies? Just make the public_html dir?
-
Bill,
# mkdir /home/e-smith/files/users/$user/home/public_html
# chmod 755 /home/e-smith/files/users/$user
Jon
-
I keep getting an error when installing on v5.1.2
After answering "y" when installing the rpm, I get:
Useage:httpd {start|stop|restart|condrestart|status|fullstatus|graceful|configtest}
error: execution of %post scriptlet from e-smith-user-webspace-0.1-3 failed, exit status 1
After continuing with the instructions, and setting up a user I get an Access Forbidden. I'm guessing it isn't making the changes to htttp.conf, because the directory permissions did get changed to public_html directory is set to 644. (The user's directory is 755.)
Any ideas?
Thanks,
Abe
-
I got my permissions figured out. User error. However, I believe the rpm error was still important. After adding each user, the httpd.conf template fails to expand and httpd needs restarted... otherwise, the files are not found.
I manually added the following lines to the bottom (right above the "exit(0);")of the /etc/e-smith/events/actions/user-create-unix file:
#Expand httpd.conf template for user webspace
system("/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf");
system("/etc/init.d/httpd restart");
Everything seems to be working for me, now.