Koozali.org: home of the SME Server

Personal Websites?

Jim Hale

Personal Websites?
« 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!

Jon Blakely

Re: Personal Websites?
« Reply #1 on: September 20, 2002, 03:59:50 PM »
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

Jim Hale

Re: Personal Websites?
« Reply #2 on: September 20, 2002, 04:12:22 PM »
Mucho Thanks for the info!

I'll have to give that a try when I get home from work tonight. :)

Troels Hansen

Re: Personal Websites?
« Reply #3 on: September 20, 2002, 10:27:26 PM »
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?

Jim Hale

Re: Personal Websites?
« Reply #4 on: September 21, 2002, 08:55:55 AM »
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.

Jon Blakely

Re: Personal Websites?
« Reply #5 on: September 22, 2002, 05:11:04 AM »
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

Jim Hale

Re: Personal Websites?
« Reply #6 on: September 22, 2002, 05:18:16 AM »
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. :/

Holger

Ooops
« Reply #7 on: November 09, 2002, 09:56:43 PM »
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
------------------------------------------------------------

Jim Hale

Re: Ooops
« Reply #8 on: November 09, 2002, 11:50:48 PM »
I get that too... but it still seems to work fine. :)

Mika Löf

Re: Personal Websites?
« Reply #9 on: October 23, 2003, 08:00:06 PM »
Isn't it a bit unsecure to have 0755 mode on users homedir? Anyone can read anything in and below homedir.

oseano

Re: Personal Websites?
« Reply #10 on: October 22, 2004, 07:23:22 AM »
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

Quote from: "Troels Hansen"
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?