Rebuild permissions and chmod

thealee

Member
Oct 5, 2006
16
0
151
Hi there,

Is there any way to rebuild the permissions on the folders in /home (the user's files) and make their chmods of the public html etc. workable.

Currently my website shows up as "You don't have permission to access / on this server."

Help!

-Alee
 

jester.ro

Well-Known Member
PartnerNOC
Feb 6, 2004
304
0
166
Bucharest, Romania
cPanel Access Level
DataCenter Provider
Are yous sure you have an index.html or index.php in public_html ?

you could try running /scripts/chownpublichtmls in a shell.
(i've never tried it tough, i have no idea if it can break anything)
 

mambovince

Well-Known Member
Jan 15, 2005
193
0
166
London, UK
jester.ro said:
you could try running /scripts/chownpublichtmls in a shell.
(i've never tried it tough, i have no idea if it can break anything)
I have used it many time and works fine, and fixes on all domains on that server.

If you need to just run on one user account, use the following from SSH:

cd /home/username/public_html/
chown -R username:username *

- Vince
 

brianoz

Well-Known Member
Mar 13, 2004
1,146
7
168
Melbourne, Australia
cPanel Access Level
Root Administrator
chownpublichtmls while a useful command will not solve this problem if I'm correct.

The message you mention comes from apache and means that there is no index file in that directory (ie public_html probably), and that 'Options -Indexes' is set (rather than 'Options Indexes'). The fix is to place an index file in there, ie restore the site files from elsewhere correctly, or create an index.htm/index.html/index.php file; or, in the unlikely event that you need it to work this way, edit .htaccess to enable the default indexing ('Options Indexes' - but don't do this, as this weakens security, and the fix is probably to restore the site files correctly).
 

levelsupport

Well-Known Member
Oct 7, 2006
47
0
156
try runnning these commands
chmod 750 /home/username/public_html

make sure you have a index.html or index.php on that directory
if your file is index.html and if its permission is correct AND STILL if you get this error
open your httpd.conf
and try adding this below your domain virtual host

DirectoryIndex index.html index.htm index.wml index.cgi index.shtml index.jsp index.js index.jp index.php4 index.php3 index.php
right after
DocumentRoot entry