404 error for a file that is absolutely there - html

I am getting a 404 error for a file that is absolutely there.
It's at location domain.com/video/videoname.mp4. When I try to play it using Flash, it says video not found or access denied.
It keeps giving not found errors.
When I navigate to domain.com/video/, videoname.mp4 appears very clearly there. However, when I click it, it gives a 404 error.
Would this be a permissions issue?
It's a Windows server, which I'm less useful. There's also an IIS install, but it isn't used in the actual administration of this particular site.
My guess is a server setting or a permissions setting, but I'm trying to do a sanity check here.

You can setup the IIS server to run under a specific account one that doesn't have access issues. I would just make sure you create an application account to do this and don't put it on a user account. I know that there are IUSR accounts that are the default accounts that are used by IIS these default accounts might have the permission issues.
Another possibility is that the MIME type for the video is not setup properly. You could put a basic html file in this directory to test to see if the extension MIME mapping might be a problem.

Related

Headless Chrome fails under IIS but works on command line

I am wrapping headless chrome using the excellent ChromeHtmlToPDF library. This we are using to dynamically render PDFs from a website. This works locally under IIS express, and also works on the server when recompiled as a console app, so the technology works. However running under IIS, chrome always exits immediately and a error of "one or more parameters are invalid", is returned.
You can fix this by passing Chrome a custom user profile directory:
chrome.exe --user-data-dir="C:\NewChromeProfile" ...
This directory will be created by the account under which Chrome is running, and therefore the account will have the permissions it needs.
After many many hours looking into this I finally solved it by running it under my own user, the restricted IIS user, then comparing the activity logs generated by the excellent microsoft process monitor.
I tracked it down to file permissions on one directory: C:\Windows\System32\config\systemprofile\AppData\Local\Google\Chrome\User Data
The app pool user needs write + modify permissions to this directory. It's up to you if you feel this is an acceptable security risk; however for us it is, for now.
This is where headless chrome stores it's crashpad directory. No amount of parameter fiddling seems to be able to dissuade it of this. That seems to be a bug.
Hope this helps someone else, I couldn't find anything on this anywhere.

Wordpress Reinstallation - You don't have permission to access /sitename/ on this server

We've been working hard on a sandbox server. We installed WordPress to it from scratch. I created the database, and imported the previous database into it. The user and password both have been created.
Right now, our error is "403 Forbidden: You don't have permission to access / on this server". I can't access any of the files by typing in the server IP address,though we see and control everything as root via Putty, or manage it through FileZilla. Root is the owner of all WP files/folders.
I found this source: WPBeginner-403-Error-Fix and am currently changing the permissions on the files; the folders are done and the permissions are set to 755. File permissions are being set to 644. Out of all the resources we had referred to, it never mentioned WP requiring specific permissions. I got right onto that today. While this is running, I still get the message after the folder permissions were changed, and as the file permissions are being processed:
You don't have permission to access /wp-admin/login.php on this server.
We also had a bootstrap file located in the same place as the WP installation / contents (this was a test). The bootstrap is very much accessible: the CSS/JS folders with the supporting content can be seen if you type the ipaddress/directory for the bootstrap version... you can see the files and structure. If you type in ipaddress/boot.html, it runs it flawlessly. If we try referring to anything with WP, it does not like it and throws the 403 error.
There is no .htaccess, I read online it would generate via permalinks in the panel. But we can't even see the panel. It's currently .htaccessOLD (from when we imported our old WP contents to the dev server, from the production site), so there should be no interference.
None of us has installed WP directly, the guy who did it previously no longer is part of the company, so we are becoming lost in this process.
Edit: Plugins were disabled via renaming convention, however, WP actually regenerated this folder.
Edit (2): With the permissions set, and the plugin/theme deactivated, it still does not run due to 403.
Weird... my answer didn't post yesterday as I had thought.
So- we solved it. The permissions were set accordingly for all directories/files, the issue was the server configuration. Just triple check the server configuration file (usually httpd.conf on current servers) to ensure it points to the directory containing the WP contents.
If this is still a problem to some people, and you swear that the httpd.conf file is correct, it does not hurt to double check your directories. The directories should be permission 755. Files should be 644, excluding the wp-config.php (that ought to be set for permissions 455).
Thank you for helping us troubleshoot! We really appreciated it! :)

Hosting basic html site on iis

I have a basic web site (just html, js and css files) that I want to host on IIS on my local machine for testing purposes. The site runs fine when I run it directly as a file on my computer. I added a website on IIS, using the directory these files are located in, but when I try to launch it, I get an error page that says:
An error occurred loading a configuration file: Failed to start monitoring changes to '[my site path]' because access is denied.
It then says that the source file is a web.config. I know that ASP.NET sites use a web.config, but I don't even have one, and I just want to run a basic site using html, css, and javascript.
Any ideas on what the fix might be? I made sure I have an application pool for the site.
You likely put it into your user profile -- ie c:\users\skitterm\ -- which won't let the process running IIS read the folder. You are better off using IIS' built in directory structure in c:\inetpub and adding a folder for your site.
As you can tell this is a server misconfiguration. It would help to know the version of your IIS.
You can follow the steps on Microsoft's official knowledgebase to resolve the issue:
http://support.microsoft.com/kb/316721
http://support.microsoft.com/kb/317955 (for IIS v6.0, try Method 3)
I worked in IIS about a year ago and such errors are caused by misconfigured Security settings in IIS.
Sounds like you need to set up the proper access rights for the folder to the account specified by the application pool identity.
First make sure that your folder is not anywhere under your \users\, \program files\, or any other place that already has restricted access. Put it under a folder on the root (\inetpub is a good place).
Then, add the appropriate permissions (usually read only) for the folder to allow the user account specified by the app pool identity to access it. If the app pool identity is set to ApplicationPoolIdentity, adding the IIS_IUSRS local group should do it. Otherwise, use the account that is specified.
This should fix the problem.

Windows Server 2012 IIS Issues

Let me first say I soley beleive IIS is usless because I have never gotten it to work ever, no matter what I do it never lets me access the website.
Before I start let me establish I have no choice but to use IIS in this instance and I really need this to work.
Let me also establish the following:
Yes I have tried turning it off and on again
There is 0 (NONE) firewall on this machine, and yes the server is entirely updated
My question is, whenever I try to create a website, for example the port im launching a server on is on port 3606.
I am attempting to have my website come up on port 3606, and direct me into a folder that is located at c:\mysqlservices
Now! Inside this folder is phpmyadmin source files, and in a desperate attempt to get this to work I have made the permissions to where EVERYONE, IUSR and IIS_USR all have full read write and nuking permisisons to this directory, its files, and all of its subdirectories.
Now, When I go to this address, for example, panel.archservers.com:3606,
All I get is the issue "403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied."
Thank you in advance for the help, all I need is to get this IIS server to actually work, because as it is, I cannot do anything with this IIS server..
Thank you very much in advance
This link suggest to add "IIS_IUSRS" user, which is not the same as "IIS_USR".
I needed to install the PHP core, then reset my permissions back to just iis_usrs.
It worked great
you are entering a wrong context...give a correct context of your application it will open that page..
Ex:
www.example.com - Forbidden Error
www.example.com/ex.jsp - Displays the respected page
Also check proper permissions are supplied or not to the directories

Adding a .htm file to an IIS website asks for username and password instead of displaying the page

This is probably a simple fix, but I am having trouble googling the answer. What I have done was make a copy of a page that is currently on the site and renamed it. So for example I made a copy of page1.htm and renamed it to page1temp.htm. Now when I try to navigate to page1temp.htm it won't display the page, but instead asks for a username/password. If I navigate to page1.htm it still works as expected. I'm not sure what I am missing here. I am using IIS on a Windows Server 2003 R2.
I'm not sure what I need to change in IIS to get the page to display properly. Any help or clues would be greatly appreciated.
Check the NTFS permissions of the file (for example, by right-clicking on the file in Windows Explorer and checking the Security settings). Compare the permissions for both files. Chances are that the user used for anonymous authentication of your web site (might be IUSR_something) has permissions to read one file but not the other.