Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: Jim Hale on September 20, 2002, 03:53:04 PM
-
I can't seem to find out how to have the users, that have accounts, have a personal website under their folders. Is there a How-To or anything along those lines on how to do it?
Thanks!
-
Jim,
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.
# 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.
# mkdir /home/e-smith/files/users/$user/home/public_html
# chmod 755 /home/e-smith/files/users/$user
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
Jon
-
Mucho Thanks for the info!
I'll have to give that a try when I get home from work tonight. :)
-
I have tried this, and it actually works. Changed permission om the folders to let apache read the content. My problem is that when I upload an index.htm it gets permission -rw-rw---- which gives an err code 403, access denied. Is there any way to solve this so that the new created files enherit the right from the folder they are in?
-
It worked fine except when it created the the fodler for the website, it named the folder 'public.html' and I was getting all kinds of permission errors. Once I renamed the folder 'public_html', everything was ok after that.
-
Jim,
The rpm does not create the public_html folder, you do that when you do
# mkdir /home/e-smith/files/users/$user/home/public_html
you must have done
# mkdir /home/e-smith/files/users/$user/home/public.html
Jon
-
No - the script did it. I checked and there was NO folder, I created the account and it created 'Public.html'.
I tried this 2 or 3 times it it did the same thing on each one. :/
-
I got this when I tried to install the rpm:
-------------------------- snip ----------------------------
Would you like to enable User Directories? (y/N): y
Usage: httpd {start|stop|restart|condrestart|status|fullstatus|graceful|help|configtest}
error: execution of %post scriptlet from e-smith-user-webspace-0.1-3 failed, exit status 1
------------------------------------------------------------
-
I get that too... but it still seems to work fine. :)
-
Isn't it a bit unsecure to have 0755 mode on users homedir? Anyone can read anything in and below homedir.
-
Hi, All
I also have the same problem, every files/folder that upload to public_html gets -rw-rw---- permission.
Anyone know how to solve this problem ?
I use SME 6.01
Thx for help,
Sean OSeano
I have tried this, and it actually works. Changed permission om the folders to let apache read the content. My problem is that when I upload an index.htm it gets permission -rw-rw---- which gives an err code 403, access denied. Is there any way to solve this so that the new created files enherit the right from the folder they are in?