473,769 Members | 5,742 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to assign permissions on file?

There are 2 Users on PC - User1 & User2. It is necessary to assign for User1 "Full control" on file c:\test.txt & to assign for User2 "Read only" on fhat file. How can I do it using .NET framework classes & C#?
Jul 21 '05 #1
2 1374
Take a look at FileIOPermissio n class and available methods. And samples of
course.

HTH
Alex

"CsharpStud ent" <an*******@disc ussions.microso ft.com> wrote in message
news:BD******** *************** ***********@mic rosoft.com...
There are 2 Users on PC - User1 & User2. It is necessary to assign for

User1 "Full control" on file c:\test.txt & to assign for User2 "Read only"
on fhat file. How can I do it using .NET framework classes & C#?
Jul 21 '05 #2
Take a look at FileIOPermissio n class and available methods. And samples of
course.

HTH
Alex

"CsharpStud ent" <an*******@disc ussions.microso ft.com> wrote in message
news:BD******** *************** ***********@mic rosoft.com...
There are 2 Users on PC - User1 & User2. It is necessary to assign for

User1 "Full control" on file c:\test.txt & to assign for User2 "Read only"
on fhat file. How can I do it using .NET framework classes & C#?
Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
6909
by: lkrubner | last post by:
I want to give users the power to edit files from an easy interface, so I create a form and a PHP script called "fileUpdate". It does a reasonable about of error checking and prints out some errors. It uses fileperms() to get the permissions of the file, and it includes that info in any error message. Today I'm getting the following error message. I've used SmartFtp to go in and set the test file's permissions to 777, but in this error...
0
2328
by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting FrontPage extensions 2002 hosted by the company 1&1 with only limited server configuration via a web based control panel. My query relates to the ASP security model and how it relates to FrontPage options for setting file access on a database file. If you know of any online documentation...
2
3939
by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting FrontPage extensions 2002 hosted by the company 1&1 with only limited server configuration via a web based control panel. My query relates to the ASP security model and how it relates to FrontPage options for setting file access on a database file. If you know of any online documentation...
6
2284
by: !!! Klutzo !!! | last post by:
I give permissions for ASPNET on a top level subdirectory. A windows program copies a file into the subdirectory, however, my web service cannot access the file because it does not have permissions. Shouldn't the file automatically inherit permissions by being dropped into that top level subdirectory?
1
347
by: CsharpStudent | last post by:
There are 2 Users on PC - User1 & User2. It is necessary to assign for User1 "Full control" on file c:\test.txt & to assign for User2 "Read only" on fhat file. How can I do it using .NET framework classes & C#?
1
2227
by: beary | last post by:
Hello everyone, I'm not sure if this is the correct forum for this, and apologies for the length of this question, but I'm desperate for some good advice... I'm in way over my head with file permissions. The directory and files are sitting on a linux server. I know almost nothing about linux. The background: I was given a web share by my IT admin. Initially, the web share had 3 users, myself (as the owner) ,root (the group) and...
2
2049
by: beary | last post by:
Hello everyone, I posted this in unix/linux but it received no replies, so I assume it was the wrong forum. I'm trying here. I'm in way over my head with file permissions. The directory and files are sitting on a linux server. I know almost nothing about linux. The background: I was given a web share by my IT admin. Initially, the web share had 3 users, myself (as the owner) ,root (the group) and everyone. I could copy and paste from my...
0
1104
by: owuraku | last post by:
I appreciate the help you guys (especially Adezii) have given me thus far. I have one more question to help me complete my database. I am trying to use DAO to programmatically assign permissions to users of my database instead of using the workgroup wizard. If I use DAO thus it necessary mean that I would have create a workgroup?? Now my main question. I browsed around the microsoft Help and Support website:...
5
4353
by: ashok90 | last post by:
hi Experts, I want to use Active Directory with C# .Net. My Problem is that i want to restrict some users on my system(which is not on any network) from accessing some applications like oracle, adobe photoshop. How can we do this programmaticaly through C# with the hep of active directory. How can we grant or revoke permissions from users through Active Directory. I simply want to assign different users different permissions on...
0
9586
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10210
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10043
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9990
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5298
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.