Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: trixxa on July 03, 2002, 11:24:01 PM

Title: User dir with php and Webaccess
Post by: trixxa on July 03, 2002, 11:24:01 PM
Sorry my english is not so good....
On sunday i found the e-smith webserver software..
My Problem was to give a Webb Folder with Webspace to friends.
How to make a folder in /home working with PHP ?
... and no 403 Error ;-)

Ok... i searched one day in the forums... and i found :
You can use mc for this ;-)  or pico ...
Web access to userdir :
I have copied the /etc/e-smith/templates/etc/httpd/conf/httpd.conf/50UserDir00 to /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/ and edited it:

Code: [Select]
# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is recieved.

UserDir home/public_html
UserDir disabled root
create a fille called:  90e-smithAccess50userdir

This file should contain :


AllowOverride FileInfo AuthConfig Limit
Options ALL
Options +Includes
#Allow PHP
AddType application/x-httpd-php .php .php3

Order allow,deny
Allow from all


Order deny,allow
Deny from all




Then ran /sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf and restarted httpd. I even created a home/public_html directory for each user.

chmod the home and the public_html directory

(I think there is a way to create the directory automatic when adding a new user but i am just a newbie)

now call http://domain/~username/ and you should get a result .

Good luck
Title: Re: User dir with php and Webaccess
Post by: trixxa on July 04, 2002, 12:12:00 AM
Ok i have it ;-)
I use Midnight Commander type mc in console.

open /etc/e-smith/events/user-create/@s15user~te-unix

change under # set initial permissions on users root directory

chmod 700 to chmod 755

and ad this line :
mkdir "/home/e-smith/files/users/$userName/public_html",755  ;

save the file

I have tested it and it works fine !!
Title: Re: User dir with php and Webaccess
Post by: trixxa on July 09, 2002, 05:30:55 AM
Ups.. better change S20user-C~filedir

do it like the first dir in this file..
you can use an new var like $pubdir
this is the dir which should be createt and chown in users/username/home/

This works and the user is the owner..