403 Error

32 posts / 0 new
Last post
#1 Sat, 07/07/2012 - 20:07
TechSpaz

403 Error

So I just connected my domain with it, it made a new user and wen't through everything. Now that it is connected I go to my domain but get a 403 error. I'm not sure why it is doing this. Even when I go to my VPS' IP address I get a 403 error. Any help? :\

Sun, 07/08/2012 - 01:04
helpmin

403 usually means "permission denied", so I would check your permissions, htaccess files etc

Sun, 07/08/2012 - 01:45 (Reply to #2)
TechSpaz

I have done that

Wed, 07/11/2012 - 02:17 (Reply to #3)
vectramind

Hello TechSpaz,

My site has got 403 forbidden error and after submitting my site in different sites , i realized that its in problem? Is there any problem with that submissions? ( Doing SEO for my site - link building ) Is there any issue if i continue submitting the site today also..

How to resolve the problem?

Please help me in this regard. Thanks in advance :)

Sun, 07/08/2012 - 02:39
helpmin

You probably missed something.

Sun, 07/08/2012 - 11:23 (Reply to #5)
TechSpaz

All I know is that it only started happening when I made the new user and the domain was added. If I were to delete the user it would be fine.

Sun, 07/08/2012 - 17:18
Xencored

This happens to me "sometimes" I found the only way to fix this was to backup everything ive done on the domain and then just pure delete it, Than remake and import the backup.

Works for me when I get the 403 error on a "new made domain"

Mike

Sun, 07/08/2012 - 18:19 (Reply to #7)
TechSpaz

I deleted the virtual server and added it again but still getting the 403!

Sun, 07/08/2012 - 18:26 (Reply to #8)
TechSpaz

I have two IP address's. For example:

.123 works when I go to it.

.122 gives a 403 and is the IP the site is on.

Sun, 07/08/2012 - 18:36 (Reply to #9)
Xencored

Silly question but are both ips pointing to the domain?

Sun, 07/08/2012 - 18:51 (Reply to #10)
TechSpaz

I have the IPs set to two different name servers.

Mon, 07/09/2012 - 12:16 (Reply to #11)
TechSpaz

Okay, I got most of the those errors worked out but I have now walked into a different problem. When I make a new user everything goes 403. This means I cannot make a FTP user without it all going 403 which really makes me mad.

Any help?

Mon, 07/09/2012 - 13:00
andreychek

Hmm, that's pretty odd, making a new user shouldn't change anything that might cause an error.

My two questions are --

  1. What steps are you taking to create a new user?

  2. For the domain where you're seeing these 403 errors -- if you look in $HOME/logs/error_log, what errors are you seeing in there?

The above should help pinpoint what's going on... thanks!

-Eric

Mon, 07/09/2012 - 13:26 (Reply to #13)
TechSpaz

This is what I have found out to work:

I made a new virtual server with my domain. Got a 403 error with the domain and my IPs I have for it. So, I would delete the virtual server and then everything is fine. At this point my domain is now pointing at /var/www/html which is fine. The problem is, I go to make a new user and I assign it to be at /var/www/ so I can access that via FTP. Once it is made I get a 403 error.

Mon, 07/09/2012 - 14:01
andreychek

Hmm, how did you perform your Virtualmin installation -- did you by chance use the install.sh script?

It sounds like you may be going against the grain a bit there with how you're setting things up.

Virtualmin, by default, places websites within /home -- and trying to use directories outside of that can cause some problems.

-Eric

Mon, 07/09/2012 - 14:12
TechSpaz

I did wget whatever the link is to download and then ran /bin/sh install.sh

Mon, 07/09/2012 - 18:23
andreychek

Okay, well, you didn't mention the errors that you're seeing in the logfiles -- however, it may be related to where your websites are installed.

My recommendation is to use the default Virtualmin paths -- when you create a new Virtual Server, you can then place the website for that Virtual Server in /home/username/public_html.

That would ensure that suexec isn't causing any of the problems you're seeing, as it default to using /home for all the content it serves.

Even if that's not the issue you're seeing ATM, using the default paths would would prevent other problems in the future :-)

-Eric

Mon, 07/09/2012 - 19:01 (Reply to #17)
TechSpaz

I made a new virtual server for it and I am getting a 403 still. Also, it won't let me edit the error log file to get what is going on.

Mon, 07/09/2012 - 22:30
andreychek

When you say "it won't let you", what error are you seeing?

You could also try using Virtualmin to access the error logs -- you can do that by clicking Logs and Reports -> Apache Error Log.

-Eric

Mon, 07/09/2012 - 22:51 (Reply to #19)
TechSpaz

[Tue Jul 10 03:54:47 2012] [error] [client 97.125.243.23] Directory index forbidden by Options directive: /home/techspaz/public_html/ [Tue Jul 10 03:57:42 2012] [error] [client 97.125.243.23] Directory index forbidden by Options directive: /home/techspaz/public_html/ [Tue Jul 10 03:57:42 2012] [error] [client 97.125.243.23] File does not exist: /home/techspaz/public_html/favicon.ico, referer: http://techspaz.com/ [Tue Jul 10 03:57:43 2012] [error] [client 97.125.243.23] Directory index forbidden by Options directive: /home/techspaz/public_html/ [Tue Jul 10 03:57:43 2012] [error] [client 97.125.243.23] File does not exist: /home/techspaz/public_html/favicon.ico, referer: http://techspaz.com/ [Tue Jul 10 04:23:13 2012] [error] [client 67.202.17.99] File does not exist: /home/techspaz/public_html/manager [Tue Jul 10 04:34:01 2012] [error] [client 97.125.243.23] Directory index forbidden by Options directive: /home/techspaz/public_html/ [Tue Jul 10 04:34:01 2012] [error] [client 97.125.243.23] File does not exist: /home/techspaz/public_html/favicon.ico, referer: http://techspaz.com/ [Tue Jul 10 04:54:08 2012] [error] [client 97.125.243.23] Directory index forbidden by Options directive: /home/techspaz/public_html/ [Tue Jul 10 04:54:08 2012] [error] [client 97.125.243.23] File does not exist: /home/techspaz/public_html/favicon.ico [Tue Jul 10 05:02:07 2012] [error] [client 81.152.187.113] File does not exist: /home/techspaz/public_html/community [Tue Jul 10 05:16:19 2012] [error] [client 81.152.187.113] File does not exist: /home/techspaz/public_html/community [Tue Jul 10 06:07:57 2012] [error] [client 108.171.243.62] Directory index forbidden by Options directive: /home/techspaz/public_html/, referer: http://techspaz.com/ [Tue Jul 10 06:07:57 2012] [error] [client 108.171.243.62] Directory index forbidden by Options directive: /home/techspaz/public_html/, referer: http://techspaz.com/ [Tue Jul 10 06:10:34 2012] [error] [client 97.125.243.23] Directory index forbidden by Options directive: /home/techspaz/public_html/ [Tue Jul 10 06:10:34 2012] [error] [client 97.125.243.23] File does not exist: /home/techspaz/public_html/favicon.ico [Tue Jul 10 06:14:15 2012] [error] [client 198.186.192.44] Directory index forbidden by Options directive: /home/techspaz/public_html/ [Tue Jul 10 07:08:45 2012] [error] [client 198.186.192.44] Directory index forbidden by Options directive: /home/techspaz/public_html/ [Tue Jul 10 07:21:28 2012] [error] [client 66.249.67.170] File does not exist: /home/techspaz/public_html/robots.txt [Tue Jul 10 07:38:21 2012] [error] [client 66.249.67.170] Directory index forbidden by Options directive: /home/techspaz/public_html/

Also, it says that it isn't a file that is editable.

Mon, 07/09/2012 - 23:37
andreychek

Howdy,

The errors listed in there are "Directory index forbidden" errors -- that suggests that it's just missing website content.

Try uploading a simple index.html site into the public_html folder, are you able to view that then without any errors?

-Eric

Tue, 07/10/2012 - 01:12 (Reply to #21)
TechSpaz

It looks like it is working now! Thank you very much! I will contact you on here if I have anymore problems.

Tue, 07/10/2012 - 01:29 (Reply to #22)
TechSpaz

New Issue:

When uploading files via FTP it says this:

Error: Critical file transfer error

Then all files fail to upload.

Tue, 07/10/2012 - 09:33
andreychek

Hmm, do you see any other messages or errors?

FTP typically works by default on most systems, so it's difficult to know why it's not working with the error message it's giving you there.

You could always try the idea in the "FTP Service isn't working" article at the end of the URL here:

https://www.virtualmin.com/documentation/web/faq

Tue, 07/10/2012 - 10:27 (Reply to #24)
TechSpaz

Sadly that didn't work. Also, this is what I fully get:

Status: Connected Status: Starting upload of C:\Users\Jared\AppData\Local\Temp\Rar$DRa0.263\upload\admincp\vbshout.php Command: CWD /public_html/community/admincp Response: 250 CWD command successful Command: PWD Response: 257 "/public_html/community/admincp" is the current directory Status: Retrieving directory listing... Command: TYPE I Response: 200 Type set to I Command: PASV Response: 227 Entering Passive Mode (50,115,165,122,224,109). Command: MLSD Response: 150 Opening ASCII mode data connection for MLSD Response: 226 Transfer complete Command: TYPE A Response: 200 Type set to A Command: PASV Response: 227 Entering Passive Mode (50,115,165,122,170,51). Command: STOR vbshout.php Response: 550 vbshout.php: Permission denied Error: Critical file transfer error

Tue, 07/10/2012 - 11:49
andreychek

Ah, the "Permission denied" is the relevant error there -- that means that the user you're using doesn't have permission to write to that directory.

Are you using the owner of that particular Virtual Server while performing the uploads?

-Eric

Tue, 07/10/2012 - 15:03 (Reply to #26)
TechSpaz

Yes, the account it makes.

Tue, 07/10/2012 - 17:15
andreychek

What is the username you're using?

And then, if you log into your server over SSH as root, what output do you get when running this command:

ls -l /home/USERNAME/public_html/community/admincp/

(where "USERNAME" is the user you're logging in as)

Thanks!

-Eric

Wed, 07/11/2012 - 22:16 (Reply to #28)
TechSpaz

What I get:

[root@ultra /]# ls -l /home/techspaz/public_html/community/ total 2164 drwxr-xr-x 3 root root 4096 Jul 9 08:07 admincp -rw-r--r-- 1 root root 23845 Jul 9 08:07 ajax.php -rw-r--r-- 1 root root 75511 Jul 9 08:07 album.php -rw-r--r-- 1 root root 17146 Jul 9 08:07 announcement.php drwxr-xr-x 2 root root 4096 Jul 9 08:07 archive -rw-r--r-- 1 root root 18309 Jul 9 08:07 attachment.php -rw-r--r-- 1 root root 75327 Jul 9 08:07 calendar.php -rw-r--r-- 1 root root 43 Jul 9 08:07 clear.gif drwxr-xr-x 4 root root 4096 Jul 9 08:07 clientscript -rw-r--r-- 1 root root 14936 Jul 9 08:07 converse.php drwxr-xr-x 7 root root 4096 Jul 9 08:07 cpstyles -rw-r--r-- 1 root root 3318 Jul 9 08:07 cron.php drwxr-xr-x 3 root root 4096 Jul 9 08:07 customavatars drwxr-xr-x 3 root root 4096 Jul 9 08:07 customgroupicons drwxr-xr-x 2 root root 4096 Jul 9 08:07 customprofilepics -rw-r--r-- 1 root root 47766 Jul 9 08:07 editpost.php -rw-r--r-- 1 root root 29495 Jul 9 08:07 external.php -rw-r--r-- 1 root root 9787 Jul 9 08:07 faq.php -rw-r--r-- 1 root root 10134 Jul 9 08:07 favicon.ico -rw-r--r-- 1 root root 36004 Jul 9 08:07 forumdisplay.php -rw-r--r-- 1 root root 39831 Jul 9 08:07 global.php -rw-r--r-- 1 root root 24920 Jul 9 08:07 group_inlinemod.php -rw-r--r-- 1 root root 138204 Jul 9 08:07 group.php -rw-r--r-- 1 root root 10522 Jul 9 08:07 groupsubscription.php -rw-r--r-- 1 root root 9048 Jul 9 08:07 image.php drwxr-xr-x 16 root root 4096 Jul 9 08:07 images drwxr-xr-x 6 root root 12288 Jul 9 20:57 includes -rw-r--r-- 1 root root 19742 Jul 9 08:07 index.php -rw-r--r-- 1 root root 43929 Jul 9 08:07 infraction.php -rw-r--r-- 1 root root 183126 Jul 9 08:07 inlinemod.php drwxr-xr-x 2 root root 4096 Jul 9 20:59 install -rw-r--r-- 1 root root 10342 Jul 9 08:07 joinrequests.php -rw-r--r-- 1 root root 17862 Jul 9 08:07 LICENSE -rw-r--r-- 1 root root 10223 Jul 9 08:07 login.php -rw-r--r-- 1 root root 15932 Jul 9 08:07 member_inlinemod.php -rw-r--r-- 1 root root 35948 Jul 9 08:07 memberlist.php -rw-r--r-- 1 root root 17064 Jul 9 08:07 member.php -rw-r--r-- 1 root root 23867 Jul 9 08:07 misc.php drwxr-xr-x 2 root root 4096 Jul 9 08:07 modcp -rw-r--r-- 1 root root 63324 Jul 9 08:07 moderation.php -rw-r--r-- 1 root root 6757 Jul 9 08:07 moderator.php -rw-r--r-- 1 root root 18477 Jul 9 08:07 newattachment.php -rw-r--r-- 1 root root 38382 Jul 9 08:07 newreply.php -rw-r--r-- 1 root root 18912 Jul 9 08:07 newthread.php -rw-r--r-- 1 root root 19634 Jul 9 08:07 online.php -rw-r--r-- 1 root root 7697 Jul 9 08:07 payment_gateway.php -rw-r--r-- 1 root root 11911 Jul 9 08:07 payments.php -rw-r--r-- 1 root root 25307 Jul 9 08:07 picturecomment.php -rw-r--r-- 1 root root 22040 Jul 9 08:07 picture_inlinemod.php -rw-r--r-- 1 root root 7890 Jul 9 08:07 picture.php -rw-r--r-- 1 root root 27412 Jul 9 08:07 poll.php -rw-r--r-- 1 root root 9513 Jul 9 08:07 posthistory.php -rw-r--r-- 1 root root 74368 Jul 9 08:07 postings.php -rw-r--r-- 1 root root 6594 Jul 9 08:07 printthread.php -rw-r--r-- 1 root root 70684 Jul 9 08:07 private.php -rw-r--r-- 1 root root 152328 Jul 9 08:07 profile.php -rw-r--r-- 1 root root 39752 Jul 9 08:07 register.php -rw-r--r-- 1 root root 5688 Jul 9 08:07 report.php -rw-r--r-- 1 root root 13719 Jul 9 08:07 reputation.php -rw-r--r-- 1 root root 124728 Jul 9 08:07 search.php -rw-r--r-- 1 root root 20947 Jul 9 08:07 sendmessage.php -rw-r--r-- 1 root root 10072 Jul 9 08:07 showgroups.php -rw-r--r-- 1 root root 12399 Jul 9 08:07 showpost.php -rw-r--r-- 1 root root 73537 Jul 9 08:07 showthread.php drwxr-xr-x 2 root root 4096 Jul 9 08:07 signaturepics -rw-r--r-- 1 root root 32877 Jul 9 08:07 subscription.php -rw-r--r-- 1 root root 13366 Jul 9 08:07 tags.php -rw-r--r-- 1 root root 8692 Jul 9 08:07 threadrate.php -rw-r--r-- 1 root root 12415 Jul 9 08:07 threadtag.php -rw-r--r-- 1 root root 34508 Jul 9 08:07 usercp.php -rw-r--r-- 1 root root 19106 Jul 9 08:07 usernote.php -rw-r--r-- 1 root root 27377 Jul 9 08:07 visitormessage.php

Thu, 07/12/2012 - 08:14
andreychek

Ah, there's the problem... did you by chance copy files into that directory using the root user?

That would have caused the files and folders to be owned as root, rather than as the Virtual Server owner... and that would prevent you from being able to write new files or edit existing ones.

You can correct that by running this command as root:

chown -R techspaz:techspaz /home/techspaz/public_html

Sun, 07/15/2012 - 18:12 (Reply to #30)
TechSpaz

All has been going well until I uploaded some files via FTP. I uploaded like 2k files because I was upgrading the forum software and now the directory won't load properly.

For example: test1.com/forum - Won't load test1.com/forum/admincp - Loads

:\

Sun, 07/15/2012 - 22:10
andreychek

To determine what's going on there, you may want to review your website error logs to determine what's going on.

You can find those in $HOME/logs/error_log.

-Eric