Set write permission to a folder

Hi Guys,

I have create a folder through code. But How can i set the write permission to the folder so that i can create file or folder in that folder. I have placed a xml there but when i going to recreate the xml through it won't. Please help me. If sample code is being posted it will help me very much.


Thanks & Regards,

тнαηкѕ ιη α∂ναη¢є,
Software Developer
4/27/2009 4:52:25 PM 27051 articles. 1 followers. Follow

4 Replies

Similar Articles

[PageSpeed] 28
Get it on Google Play
Get it on Apple App Store


Take a look at this

 One of the things you need to be aware of is the permissions on the folders when you create the, you need write permissions when accessing it in IIS

4/27/2009 5:40:13 PM

Additional information.

ASP.NET web site will run under "Network Service" account by default.

Andrew Zhu
Microsoft online ASP.NET support
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
5/4/2009 6:11:46 AM

 Hi Guys,

 I want to set the permission through code. Which I was not able to do. I have got some articles about ACL. But don't know how to use this. Please help me. In windows we right click on the folder with the list of groups(Everyone,Users,Administrators) etc. and we choose which group we are going to give the permission. I want that by code. Please provide some sample code. One more question I had is how to get this group names through code.

 Thanks & Regards,


тнαηкѕ ιη α∂ναη¢є,
Software Developer
5/4/2009 12:30:31 PM
These two links should help:

If anything Is not clear, please update here.

Andrew Zhu
Microsoft online ASP.NET support
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
5/5/2009 1:14:21 AM

Similar Artilces:

Setting security permissions for folders
How would I go about setting security permissions for folders on my server using ASP.NET C#?I'm using a file upload utility that came with the wonderful freetextbox to upload images to a folder on my server, and unless I use a utility provided by my internet host to adjust security permissions to allow a particular user to write to that folder I get the an error similar to the following: Exception Details: System.UnauthorizedAccessException: Access to the path 'E:\kunden\homepages\9\d208359986\images\bulgaria.gif' is denied. ASP.NET is not authorized to access the requested reso...

Write Permission for folder at runtime in .NET
Hi, We have an ASP.NET application which needs to write some files on the disk. For these we need to give ASP.NET user the Write permission for that particular folder. This is possible from Windows explorer. We don't want to given permission from Windows Explorer. Is there any way of giving Write permission for folder through code ? We want to assign the Write permission for the folder at the installation time. Is it possible ? Please let us know.   Thanks in advance, Santaji Garwe...

Set NTFS folder permission programmatically in .Net 1.1
Hi, Does anyone know how to set NTFS folder permission programmatically using C# in .net 1.1?  In .net 2.0 we can make use of But in 1.1 the accesscontrol class was not included.  Any help is appreciated. Thanks.. try this: TiGGeR Hi, Thanks for the link. I recently find out that it could be double hopping of credential issue. I am trying to figure that out with kerberos delegation method.  If thats work, I will post it here.  Cheers  ...

how to write codes to set NTFS folder permission for specific user?
hi, can someone help me. i'm having trouble to find codes to set NTFS folder permission for specific users. for example: i have user ABC in Client group & folder DEF. i want to set only ABC/Client can access DEF folder. other users is deny to access the folder. how can i write that in codes?. if possible. please help. tQ Check out this blog post for an example of setting DACLs: If you need to convert C# to VB, use this translator: Darrell Norton, MVPDarrell Nort...

Set Share Permissions on a Shared Folder via VB.Net
Recently,  I started writing some VB.Net code to convert a folder to a shared folder but during the process I can't seem to set the share permissions.  Below is the code in which I convert a folder to a shared folder.  My question is: Does anyone have an example in which I can set the Share Permissions for a shared folder programmatically via VB.Net?  I can make the folder shared and set the NTFS Permissions but haven't had any luck with setting Share Permissions.  Thank you in advance.   Imports System.DirectoryServices Imports System.IO Import...

Setting folder permissions to only one folder on server
Hello, I'm trying to figure out how to set premissions for a user to only one folder on the entire linux server (SLES 10). I just want this user to ftp into the server and have writes to put files in one folder. I don't want this account to have access to anything else on the server? This is possible, if so, how? Thanks. jchaparro, that is only possible if you configure a change root environment for the user. The change root environment doesn't allow the user to leave that "container" and see any other files and folders. In all other cas...

create a folder of the user and set their permission to that folder + others
I am wanting to do the following with 2.0.  I'm using VWD Express if that helps 1. A user registers on the site - a email is sent to the user with an activate link. 2. Upon activation a subfolder named the username is created under a members folder and a generic default.aspx file is created in the folder 3. When the user logs in it takes them to their control page (control.aspx).  This page allows them to update a default.aspx file with a wysiwyg editor for their free page. 4. Some users will be granted the permission of writer which allows them to contribute to th...

Setting Folder Permissions
I have been charged with setting the folder security/permissions/access structure for small company (about 40 users). I am finding it remarkably difficult to figure how to do it. There are so many a different collections of accesses and permissions that setting up access groups and assigning users to those groups and then assigning the correct security groups to each folder and sub folder seems an impossible task. I am sure that I am making this harder than it needs to be so here is my request: Can anybody point me to some resources that will provide me with a way of loo...

Folder Permissions Security
I have a Windows XP Pro and a Windows 2000 Pro machine. I'm always torn on what permissions I should set for ASPNET, IUSER, and Everyone because I just don't know enough about it. I'm just using my IIS to test my ASP.NET pages locally but could altering the permissions make my computer vulnerable to an attack if I'm connected to the internet? You'll have to forgive my novice thinking in this area. Could someone point me to a tutorial that teaches me about all this or just give me some advice? Thanks. Selfminded Hi, In a sense, the answer is pretty simple. Give whatever login ASP.NET...

security permissions on a folder
Hello all, I have an password protected website, where a user can upload a file to a folder on a server. I need to set permissions on the folder to allow this.   Can anyone tell me what user I must grant access and what level of permission they require? I am trying to make sure that this is as secure as possible. I am using asp 2.0.  Thank you   Give Read & Write permissions on that folder for ASP.Net Machine Account i.e. (MachineName)\ASPNET if it's on your local machine and NETWORK SERVICE if it's on the server. Hope it helps. KAMMIEDon't forg...

Set folder permissions during install
Hi, I am trying to alter the folder permissions during the install of my web app. For instance users need write access to some folders. My plan was to get the TARGETDIR property of the install and pass that to xcalcs.exe (command line permissions editor). Unfortunately I can't find a way to get hold of the TARGETDIR to pass it to an exe or vbs. Does anyone know how to do this, or is there an easy way to do this I dont know about. Thanks Colin Just as the mod approves it I find out how to do it myself. You need to put [TARGETDIR] in the arguments property in the propert...

Security settings for the root folder
I asked (more than once) my ISP to configure the Security settings for the root folder of my website to allow Full Control for the process. However, according to them, they cannot do that because of security reasons, without telling me what are the security issue (arg...). What argurments or informations can I give to my ISP to convice than to set up the my account to allow the to create or delete directories. Can the ASP process have less than full control and still be able to create or delete sub-portals?. What is the minimal security setting that have to be set for...

Setting security on virtual folders
Hello,I run a small .NET web site for programmers. I wish to allow other fellow programmers to create their own web site in my web server. I developed the UI so that other programmers can login and create a web site.When they create a web site through my site, I am doing the following in the background.1. Create windows user for the member2. Create folder in the member name3. Make the folder a virtual directory. Set the properties of the virtual directory so that his own windows account will be used for Anonymous access to his site.I have done the above steps.Now I want to assign permissions...

Write permissions to the folders in site
Hi, I have couple of folders in the site structure to which i need to assign the "Full Control" to ASPNET user. My project is under Debug and Test phase of the development. Due to this, I need to deploy the site again and again. I'm building a Web Deployment Project and running the generated setup on the testing machine. But each time I Install the application, I need to manually assign the permissions to those folders to the ASPNET user. How to avoid this overhead? TIA.Harshad Kale.Software EngineerPune, Maharashtra,India Use to create the folders then it will ...

Web resources about - Set write permission to a folder -

Permission - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Facebook Fixing Vulnerability That Would Prohibit Users From Revoking App Permissions
Facebook is working to remedy a vulnerability discovered by application security provider MyPermissions , which blocks users of the social network ...

Dwight Murphy - Ok, I now have permission to share the... - Facebook
Ok, I now have permission to share the news about Bowe Bergdahl..This in 2 emails... Here it is in Bob Bergdahls words to me! (1) You guys rock! ...

How-To: Handle Revoked Auth Permissions
This how-to document will help developers check a user's permissions and prompt that user for any missing permissions.

Facebook gives users more options for login, app permissions
Facebook CEO Mark Zuckerberg’s new mantra of “Move fast with stable infra,” might not be as sexy as “ Move fast and break things ,” but it reflects ...

Davies McDonalds Happy Meal Project- all photos ©Sally Davies- use with permission only - an album on ...
View the album on Flickr. Flickr logo. If you click it, you'll go home Sign Up Explore Recent Photos The Commons 20under20 Galleries World Map ...

Arafat's widow grants permission for Swiss lab to test poisoning theory
The Palestinian Authority also approved the probe, which was requested by Palestinian president Mahmoud Abbas after a media investigation found ...

Michael Daniel Henderson who killed three teenagers in a smash denied permission to appeal
A driver who killed three teenagers in a hit-and-run smash in southeast Queensland has been refused permission to appeal his 10-year sentence. ...

CSIRO moves toward industrial action: seeks Fair Work permission for protected action ballot
CSIRO's new chief executive Larry Marshall could soon be faced with disruptive staff.

resources last updated: 11/20/2015 1:56:26 PM