Virtual Directory pointing to UNC share - iis-6

I have an app that uploads documents to the server through the standard
When sent my application to the production server, I found out that they had the server load balanced. My solution to this was to place the upload directory into a network share and then create a virtual directory pointing to the share.
I have set permissions on the share and the file itself, but I keep getting "access denied" whenever I try to upload a document.
Where could I be missing permissions? Is it possible that IUSR needs to have access to the share?
Thanks.

FYI,
The answer to this solution for me was to setup temporary impersonation with a user account that had access to the share, the folder and the virtual directory.
Here's a link to the code that worked for me:
http://support.microsoft.com/kb/306158#4

I hope your site use anonymous access. Otherwise you will have a painful experience.
If it is so ( anonymous acess), then: The IUSR is a local user on the production servers and not a domain user. So it don't have access the the share. You will have to change that to a domain user ( in the site configuration and not on the application pool). And make sure that the application pool run on a network service ( this is the default ) and it should work.

Chances are that whatever your ASP.Net process is running as does not have access to the share.
So chances are you need to set up an IIS6 application pool to run as a domain user and have that domain user have access rights to the file share.
Don't forget to aspnet_regiis -ga {domainuser} so that the domain user can actually run asp.net applications.

Related

How can i write to shared folder through Process running with LocalSystem account

I have WCF Service hosted with "LocalSystem" Account, This will create zip file which needs to be write to network share path(Eg:-\INGBTCPIC3xxx\Shared Folder)
I use File.Create() Method to create, But it throws an Exception System.UnauthorizedAccessException: Access to the path is denied.
I know that folder has to be shared to write to it, Please let me know with which user folder needs to be shared. Because in my case WCF service is configured to run under LocalSystem a/c
Please suggest some idea
Thanks in Advance
The domain seems to different for the account which is running WCF service and the shared location.
You can use impersonate to resolve this issue: Write to a Directory as a Specific User on a Different Domain
or use as batch command:
net use /user:username password
And then use File.Create method to write the file.
Finally, I learned how to share folder to a LocalSystem Account i.e. share with hostname of system on which WCF service is running rightclick folder-->Properties-->Sharing-->Share-->Type Hostname followed by $(xxxx$) and give Read\Write access

IIS, User Permissions and Umbraco

I have installed Umbraco on my local machine but I have some questions regarding IIS and permissions if someone can help verify that I understand it all correctly. My environment is as follows
• Windows 7 Pro OS
• IIS 7.5 - I have set up a new site in IIS which has the identity Application Pool Identity for the app pool
• Umbraco v7.3.0 – The application files are located in C:\Users[myUsername]\Documents\Visual Studio 2013\Projects\InstallingUmbracoDemo\InstallingUmbracoDemo
Is the following process/understanding correct?
Add a new website in IIS and the application pool name is automatically updated to reflect my sites name.
By default this will use the identity ApplicationPoolIdentity which means that my new sites worker process (w3wp.exe) will run in an application pool that has the same name as my website in IIS
By default when I created my new site it will be added to a user group called IIS_IUSR
If I try to access my application files (that are in a folder that doesn’t not grant permission to the IIS_IUSR user group) it will mean IIS can’t access the resources until I grant the IIS_IUSR user group access
The IUSR user group is used for anonymous access and for anything anonymously requesting my website it will be added to this group
As Umbraco needs to access the internet to install the application I need to a grant permission to IUSR to allow it to do so
Partly because I don’t quite fully understand everything I’m quite concerned about the security of granting permission to IUSR on the root folder where the application files reside. Once Umbraco has installed can this user groups full permission be revoked? Does it require full permission?
I have found the following resource https://our.umbraco.org/wiki/reference/files-and-folders/permissions but if anyone else can provide an overview regarding permissions and the ISUR & IIS_ISUR work and more importantly whether I am understanding this process correctly.
Apologies if I am way of the mark – I’m just trying to learn and ensure i fully understand everything.
Many thanks
Paul
Umbraco will need permission to write files to certain folders on the server as the content/media cache, examine indexes, logs, media, etc are all disk file based.
Have you tried adding the specific AppPool user to the folders and granting permission to it?
Its usually:
IIS AppPool\MyAppPoolNameInIIS
I have had cases where that isn't allowed and I have to use IUSR, but generally this works and seems more specific and contained.

IIS 6.0 on Windows Server 2003 setup for Integrated Windows Authentication but no direct access for users to the shared folders

I am attempting to set up an IIS 6.0 application running on Windows Server 2003 to use impersonation in order to avoid having to give users direct read/write access to the shared folders where the DB and web pages are stored. Can anyone provide me with details of how this can be set up to work in conjunction with Windows Integrated Authentication?
So far, I can tell that the web.config file (not sure whether it's the correct one) has the two lines mentioned on this thread (Impersonation in IIS 7.0) to allow impersonation and use the Windows logon method. However, users are still prompted for a logon and then told they are not authorized to view web pages. They can view pages if we turn anonymous logon "on", but then their user credentials aren't passed on to the site and therefore they can't access most of it.
I'm fairly inexperienced, so I'm a bit lost here. Thank you very much in advance for the help!
Thanks to intervention from Microsoft (definitely worth the flat fee they charge per incident), we were able to identify the problem. Instead of using the network path to identify the website location on the "Home Directory" tab of the IIS properties, we were using the local drive path. That was all that needed to be changed.
Once we switched to the network path and added a dedicated service account to "Connect As...", impersonation started working right away. Users pass their logged on credentials via integrated authentication (no logon required) and the service account takes care of executing their actions on the database file.
Access to the shared folder is limited to a brief list of administrators, and data access on the web application is limited based on user names.
If anyone is stuck with this and needs help, let me know!

Cannot change files permissions on server. Could this be because my site does not have a domain name?

I am developing a site for a client who has not decided on their domain name yet. I set up an account on a web server via WHM but have not pointed any domain names to it.
All was going well until I used a plugin (TinyMCE) to try and browse files on the server - it wouldnt work so I had a look at its script files and realised their permissions are set to not executable (644). I tired to change it to executable (755) but I get an error in my FTP clients console:
550 Could not change perms on file.js: Operation not permitted
Could this be because I am accessing the server not through a specific FTP account and so the server has locked down the files?
EG: I am using the servers IP address to access files with my FTP rather then something like:
ftp.mysite.com
Any advice on this would be great! Thanks
Yes, There is an issues with the FTP account permission. You will have to login your server with the main cPanel account user name and password OR you can chnage your file permission through cPanel >> File manager

Can't access any ASPX files on my new Win Server 2008 SP2 install, enabled folder permissions/added users but still no go

Just installed Windows Server 2008 SP2
Installed IIS, ASP.NET and other necessary roles.
For my site folder I edit the permission to include
users: Network Service and a bunch of other IIS user names
a long with that Internet guest one. Fiddled around with the
application pool (Load user profile:True , Identity Network Service etc.
Also only change I made from the default fresh install settings
was installing the .Net 4 framework.
I can view regular html files etc. But should I want to make use of ASP.NET and access an aspx page, I get the following:
403 - Forbidden: Access is denied.
You do not have permission to view this directory or page using the credentials that you supplied.
When running a settings test I get:
The server is configured to use pass-through authentication with a built-in account to access the specified physical path. However, IIS Manager cannot verify whether the built-in account has access. Make sure that the application pool identity has Read access to the physical path. If this server is joined to a domain, and the application pool identity is NetworkService or LocalSystem, verify that \$ has Read access to the physical path. Then test these settings again.
Any ideas?
THanks..
I don't have an answer I know is the solution, but here are my suggestions:
First, have you mapped the IIS default web site to the folder containing your site?
Second, check your basic apppool settings, and make sure it's set to use .Net 2.0. It'll be 2.0 even if you're using a later version, like 4.0.
Barring that, make a new folder in wwwroot and map the default web site to that. Do not mess with the permissions. Then, make a new apppool, don't fiddle with it's settings, and assign that to the default web site. Point here is that you shouldn't have to mess with any of those settings: IIS will take care of that and the permissions.
Final thought, if that doesn't help: check your isapi filter mappings to make sure it knows what to do with .aspx. That should have been set up by default as well, but it's worth a look at that point.