PDA

View Full Version : Forbidden/403's




Dagless
Feb 16, 2010, 08:33 AM
In the past few weeks my site first started going slow, downloads peaked at 25kbps no matter the users connection. Then large (10mb+) downloads automatically displayed a "forbidden" error message. Images went after a few days, reloading a page would load up 1-2 more images and then stop.
But in the last week CSS no longer loads up so my site is now just text.
At first I thought it was just a permission error but I looked over them and they're fine.

I've contacted my hosts and they said they'd look into it, but that it might require switching server which would result in 24 hours of downtime. I last heard from them 9 days ago and I've sent lots of emails in the meantime. I've got an unlimited bandwidth account with them and downloads never surpass 1gb a day anyways so I'm not going over any secret limit, and they acknowledge that.

Round about the same time as this I had a sudden increase in traffic, one of my free games was linked on some Chinese blog and the number of daily downloads went from ~100 to 30,000. I thought this might cause problems so I temporarily removed the file from my own site and changed the link to point at the CNET download page. So it can't be that causing the problem any more, or can it? This was a roughly a month ago.

Try it out here (http://satansam.co.uk/collections), that's a minisite for some photos I took so it's fairly image heavy. Or it used to be :o.
But I bought another domain off them for a little company I started up which shares the same account and plan as my main site and that's running just perfectly.

Any help would be so extremely appreciated. I mean what could cause this error and are there any things I could check on my end (I'm not great with FTP and sites and such)?



splitpea
Feb 16, 2010, 08:40 AM
Have you checked file permissions? If they're OK, it's probably an issue with the server. One that the host should fix even without moving you, but that moving might at least resolve quickly, while it could take a while for them to track down the real problem.

Maxington
Feb 16, 2010, 01:22 PM
Sounds like a hosting issue imo. Have you read the fine print about the "unlimited" items on your account.

I would agree with the above poster that switching servers may be a good options at this point.

Dagless
Feb 16, 2010, 02:25 PM
They said they would inform people who use a lot of bandwidth, and I've had more daily bandwidth in the past. One of the first questions I asked was about the bandwidth but they said I was well within limits, since it was my first concern too.

Is there any method to change all the permissions, some kind of command line somewhere? I've done it individually with some files with no real luck.

jpyc7
Feb 16, 2010, 03:17 PM
Have you or the hosting company looked at the error log? That might have some info.

I tried your link and get a 403 Forbidden.

Dagless
Feb 16, 2010, 04:28 PM
Just had a scan through the latest error messages, nothing out of the ordinary there.

[16/Feb/2010:22:17:43 +0000] 67.195.111.164 - - "GET /dovestones3/Pages/98.html HTTP/1.0" 403 223 "-" "Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://help.yahoo.com/help/us/ysearch/slurp)"
etc.
Could someone have snook in there and placed some scripts that could mess it up? I really don't know too much about this kind of thing after all. :o

Consultant
Feb 16, 2010, 04:35 PM
What type of system are you running? a blog?

angelwatt
Feb 16, 2010, 04:39 PM
It's possible someone compromised your host. How are you checking permissions on files? If there is something malicious going on, one place to look is any .htaccess files anywhere in your web site. It's a hidden file so you'll need a S/FTP browser that supports viewing them (I like Cyberduck) or if you're SSH'd in you'll need the -a argument to view hidden files. If your web host supports cronjobs you can see if anything got added in there that you didn't put there.

As for a command to change permissions:
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
You'll need to SSH into your account (or use an app that lets you send commands to the host) and cd into your directory root folder (same folder that your home page is at) and then execute those commands. The first one applies the 755 permissions recursively to all files. The second applies 644 to all directories.

Dagless
Feb 16, 2010, 04:43 PM
Portfolio, devblog, site for my old freeware games and storage for my newer commercial ones. Some pages are HTML, some are PHP (Wordpress, gallery etc).

All my subdomains and webmail are still working perfectly.

Dagless
Feb 16, 2010, 05:12 PM
It's possible someone compromised your host. How are you checking permissions on files? If there is something malicious going on, one place to look is any .htaccess files anywhere in your web site. It's a hidden file so you'll need a S/FTP browser that supports viewing them (I like Cyberduck) or if you're SSH'd in you'll need the -a argument to view hidden files. If your web host supports cronjobs you can see if anything got added in there that you didn't put there.

Thanks for the commands, still getting forbidden errors though. I found a htaccess file but it was empty. Is there a command to search and delete any htaccess files, there are literally hundreds of subfolders on my hosting.

angelwatt
Feb 16, 2010, 05:14 PM
Thanks for the commands, still getting forbidden errors though. I found a htaccess file but it was empty. Is there a command to search and delete any htaccess files, there are literally hundreds of subfolders on my hosting.

Run this from inside that same directory root folder.
find . -name '.htaccess' -delete

Dagless
Feb 16, 2010, 06:05 PM
Cheers, just tried that. Also tried changing it to other variation on htaccess that appeared on my site.
It's still giving me errors though. I guess from here on it's down to the hosting company?

angelwatt
Feb 16, 2010, 06:11 PM
What permissions are you seeing on your public_html folder? Mine is set as, drwxr-xr-x

Edit: Here's a page that talks about some reasons for getting a 403 error (http://www.checkupdown.com/status/E403.html).
Another write-up. (http://www.cyberciti.biz/faq/apache-403-forbidden-error-and-solution/)

Dagless
Feb 19, 2010, 10:24 AM
Well it's gone from bad to worse. My root directory is now empty (at least to me, I imagine its still there just with some broken permissions) and I can't add any files/folders to it. Creating a file or folder throws a "Permission denied" error at me. Gah.
I've tried to contact my hosts again but they're being terribly slow about it. I'd be tempted to move from them but I've already been a customer since 2004.