file-permissions

A reliable way to determine if ntfs permissions were inherited

Hello, I have a somewhat obscure question here. What I need: To determine if the permissions (or, strictly speaking, a specific ACE of a DACL) of a file/folder was inherited. How I tried to solve this: using winapi bindings for python (win32security module, to be precise). Here is the stripped down version, that does just that, - it s...

C# - Get ASPNET WindowsIdentity

Hello, I'd like to give the ASPNET user Full Control over several files, but it looks like I'll need to get the account's token first. Does anyone know how to impersonate the ASPNET account within a desktop app? Thanks! ...

how to prevent users from creating, deleting, renaming directories in Linux?

I am a bit lost with Linux file and directory permissions. What I would like to do is have one user be able to create, delete, and rename directories, while other users are not able to do so, but they should be able to read and write to the directories as well as traverse them. So group 'storage' has access to directory /workspace, tho...

Folder permissions

How do I grant access to on an NTFS folder (Win2003) such that when files are added to this folder, they get the same access permissions? My problem is that I have granted read access to the 'network service' on a specific folder but when I add files to that folder (programatically generate the files to this folder), the network service...

Is there an API to set a NTFS ACL only on a particular folder without flowing permissions down?

In my environment, I have several projects that involve running NTFS ACL audit reports and various ACL cleanup activities on a number of file servers. There are two main reasons why I cannot perform these activities locally on the servers: 1) I do not have local access to the servers as they are actually owned and administered by anothe...

RSA Key Store Permissions

Since yesterday I haven't been able to generate strong name keys using sn.exe or through Visual Studio which also uses sn.exe. When attempting to generate a key file the following cimmand is executed sn - k "key file.snk" sn.exe then responds with Failed to generate a strong name key pair -- Access is denied. After repeating this pr...

Can't access my files in ASP.NET web site

I'm having a very difficult time. I am running windows 2008 server, I have an Able Commerce site using ASP.NET with C#. I'm writing an automated task that will ftp some xml files down into a local directory on our web server and then the program parses the xml file and saves information to our database. The problem, once I save the files...

Setting Attribute of a file in network.

I want to set attribute of a file in network to ReadOnly. File.SetAttributes(@"\\data\ntshare\tmp\Trades_LastFileUploaded.csv", FileAttributes.ReadOnly); It goes fine, but after this when i check my file over network it still appears to be !readOnly. Also, when i try to manually (using file properties) set the ReadOnly flag. It goes f...

Incorrect QFileInfo permissions for user desktop on vista 64

I am using the following code to determine if I can write to a specific directory using QFileInfo: QFileInfo dinfo(dirname); if (dinfo.exists()) valid = dinfo.isWritable() Unfortunately, when I pass in the path of the current user's desktop on Vista 64: C:\Users\USERNAME\Desktop QFileInfo::isWritable() returns false. However, if ...

Am I using SetNamedSecurityInfo incorrectly? The ACL of my file doesn't seem to be being modified properly.

I'm trying to enable and disable certain access privileges on a file. I figured out that to do this, you have to mess with DACLs. I'm using the following code to modify the file's DACL: void set_DACL_for_object(const char *object, SE_OBJECT_TYPE object_type, int access_perms, int access_mode) { PACL pDA...

In C on Unix, how can a process tell what permissions it has to a file without opening it?

I can use stat() to figure out what permissions the owner, group, or others have and I can use geteuid() and getpwuid() to get the user name of the process. I'm not quite sure how to get the groups a user belongs to without a system call though. Even knowing how to get the groups, it seems like a lot of work to integrate all of this ...

What user do python scripts run as in windows?

I'm trying to have python delete some directories and I get access errors on them. I think its that the python user account doesn't have rights? WindowsError: [Error 5] Access is denied: 'path' is what I get when I run the script. I've tried shutil.rmtree os.remove os.rmdir they all return the same error. ...

Checking for directory and file write permissions in .NET

In my .NET 2.0 application, I need to check if sufficient permissions exist to create and write to files to a directory. To this end I have the following function that attempts to create a file and write a single byte to it, deleting itself afterwards to test that permissions do exist. I figured the best way to check was to actually try...

Suggested permissions for website files

As the title suggests, I am curious as to the suggested file/directory permissions for HTML, CSS, Javascript, PHP, etc files on a website. Prior to today, I have never really thought about it because I used FileZilla on my Windows computer, and it seemed to take care of permissions just fine. I recently switched to Mac, and am using Cyb...

Can Mercurial be made to preserve file permissions?

I've seen a number of blog posts, and have experienced for myself, that Mercurial does not preserve the permissions on files pushed from one repo to another. Does anyone know of a Mercurial extension that would preserve the permissions? (I'm assuming it can't be done wit a hook, because what does a hook know about permissions at the or...

Modify Permissions not working with Windows 7 with .Net

I just got my new work computer build all done and encountered a brand new error in our application when we are trying to set modify permissions. Everything used to work perfect in Vista and my old build. The error: Some or all identity references could not be translated. The line: dSecurity.SetAccessRule(rule) The function: Public...

java.io.FileNotFoundException: (Permission denied)

i am tying to read a file placed in my documents folder on vista. The fiel does exists on a specified location but still i am getting the following error when trying to open an input stream to the file java.io.FileNotFoundException: (Permission denied) at java.io.FileInputStream.open(Native Method) at java.io.FileInpu...

File owner is changing to Administrator

Hi, I am writing the data of the application to xml. At times when i reopen the application the xml file is not access able, its owner property is changed to administrator. how the owner of the file is changing to administrator. Thanks, ...

Changing file permissions in kernel.

I am writing kernel module(C in Linux) and I want to change the permission of the other files in it. any solution? since I am in kernel I can't use chmod syscall and ... thanks for your help This is my Makefile: > obj-m += ca.o > > all: > make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules > > clean: > ...

How do I set file permissions for non-admin users in VB6?

I have an old update program written in vb6, which runs as admin. However, because it runs as admin, all the files it downloads and saves are read-only to other users. Even files in public places like the shared application data folder (which is where I'm saving the files in question). I'm lucky I found this before the 'vista-compatible...