You are not logged in.

#1 2008-12-26 18:40:49

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

[SOLVED]After changing homedir in passwd file public_html doesn't work

So what do I have to do to get public_html working in this situation? It does work with default home dir.

Last edited by kdemon (2008-12-26 19:59:23)

Offline

#2 2008-12-26 18:43:17

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

chmod 711 homedir


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2008-12-26 18:52:30

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

I tried, now it gives "Access forbidden" error

Offline

#4 2008-12-26 18:53:13

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

P.S. Before it gave "Object not found error"

Offline

#5 2008-12-26 18:54:41

archdave
Member
From: St. Louis, MO
Registered: 2008-02-26
Posts: 99
Website

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

Did you create that home directory?
     mkdir /home/new-dir

Give it proper permissions?
     chmod 770 /home/new-dir


Running GNU/Linux Arch (Core Dump) x86_64 on System Dell-a-zoid
on Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz

Offline

#6 2008-12-26 18:57:46

tam1138
Member
Registered: 2007-09-10
Posts: 238

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

Are the files readable by the user running the web server?

Offline

#7 2008-12-26 18:58:12

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

Yes I made it. Are you sure I need 770 perm? I put 770 -> "Access forbidden"

Offline

#8 2008-12-26 18:59:14

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

the location of the home folder is different than /home/user ?
770 isn't good because the others group need to have read acces. the proper one is 711 or 755

Last edited by wonder (2008-12-26 19:03:20)


Give what you have. To someone, it may be better than you dare to think.

Offline

#9 2008-12-26 19:06:31

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

to wonder: Ok, so the new home dir which I put in passwd file is /home/user/public_html. I set perm to 711 and got "Access forbidden" I tried 755 and it spit out "Object not found"

to tam1138: If I understood you correctly... httpd runs under user http (of group http). I tried log into it and browse to /home/user/public_html. Seemed ok....

Last edited by kdemon (2008-12-26 19:06:57)

Offline

#10 2008-12-26 19:08:40

archdave
Member
From: St. Louis, MO
Registered: 2008-02-26
Posts: 99
Website

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

do the chmod command as root


Running GNU/Linux Arch (Core Dump) x86_64 on System Dell-a-zoid
on Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz

Offline

#11 2008-12-26 19:10:55

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

have a look in /var/log/httpd/error_log
UPS smile

Last edited by wonder (2008-12-26 19:25:48)


Give what you have. To someone, it may be better than you dare to think.

Offline

#12 2008-12-26 19:11:05

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

to archdave: I tried from root seting 711:

Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

Last edited by kdemon (2008-12-26 19:11:24)

Offline

#13 2008-12-26 19:12:32

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

/var/log/errors_log is empty

Offline

#14 2008-12-26 19:14:40

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

O, sorry. You ment /var/log/httpd/error_log..... checking out

Offline

#15 2008-12-26 19:18:13

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

Ok, it says here "File does not exist: /home/klavs/public_html/public_html"  it seems it adds one more public_html to home path. Any ideas?


I tried looking in /etc/httpd/conf/extra/httpd-userdir.conf  and change

<Directory "/home/*/public_html">

to

<Directory "/home/*">

but with zero effect

Last edited by kdemon (2008-12-26 19:24:05)

Offline

#16 2008-12-26 19:22:58

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

yeah. i was thinking that you have made that. your home dir is /home/klavs/public_html if you had put that in passwd.
you need to edit passwd and modify to /home/klavs if you have made a mistake or create in /home/klavs/public_html another public_html. also if you leave it like this i think you need to modify /etc/httpd/conf/extra/httpd-userdir.conf directory

Last edited by wonder (2008-12-26 19:25:06)


Give what you have. To someone, it may be better than you dare to think.

Offline

#17 2008-12-26 19:27:31

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

Well, yeah, but I would really like to set users home dir to public_html, so when he logs in through FTP he sees only public_html and can upload files directly in this directory.

Offline

#18 2008-12-26 19:33:18

kdemon
Member
From: Latvia
Registered: 2008-12-11
Posts: 40

Re: [SOLVED]After changing homedir in passwd file public_html doesn't work

smile Ok it looks like it is even working. Aditionaly to previous I edited in /etc/httpd/conf/extra/httpd-userdir.conf line:

UserDir public_html

to

UserDir /home/*/public_html

and it looks like it is working like a charm.

Big thanks guys for help & support smile

Last edited by kdemon (2008-12-26 19:34:13)

Offline

Board footer

Powered by FluxBB