file-permissions

How do I programmatically check EFFECTIVE delete (modify) or write permissions in .NET?

Sorry in advance for the long question. What I'm really interested in is a way to programmatically check if the executing windows identity has adequate windows privileges to write to a directory (or file) in an ASP.NET web services application. But I'll settle for retrieving effective delete (modify) privileges for a user for a given dir...

PHP-CLI + File Permissions

When you run a php script in the command line, does is execute with the read/write permissions of the current user or what? ...

PHP Caching without messing with file permissions (Also, How to emulate ASP Application variables in PHP)

I'm trying to implement some kind of caching in a PHP script that will go out to many different clients/sites, which will be deployed by fairly non-technical users, using a variety of web hosts. Due to the non-technical nature of the users, I'd like to avoid asking them to tweak file permissions. The caching needs to be across session...

How do you change file permissions to stop Vista from writing to a file in the VirtualStore directory?

When my program first installs it places a file in the user’s AppData directory, and the program then will periodically write to that file. The problem is in Vista the writes are not made to the file in the user’s AppData directory, they are made to a copy of that file in the “VirtualStore/ProgramData” directory. The original file in t...

Delphi 2009 classes / components to read/write file permissions

Does anyone have a set of classes / components that will work with Delphi 2009 (Unicode) to read and write NTFS file permissions? There was a thing called "NTSet" - but they stopped development at Delphi 2006 about 3 years ago :-( Any other takers?? Thanks! Marc ...

Self-Updating .NET client application which needs to write in the Program File folder

Similar to: http://stackoverflow.com/questions/17533/request-vista-uac-elevation-if-path-is-protected#17544 I have a .NET Client Application installed in c:\Program Files (Windows Vista). This application should update itself, but it doesn't because of permission issues. The auto-updater should simply replace a couple of assemblies, but...

Is no FileIOPermission on paid webhosting normal?

I'm currently buying webhosting on a shared server with uses IIS6 and ASP.NET2.0 (They advertise 3.5 but investigation on my part has proven this to be false). I did some legwork to make my 3.5-sensitive ASP.NET apps compile on my hosting then discovered another problem: My apps are failing at 'File.Open()' calls due to no FileIOPermiss...

Change ownership in Vista

Hi, I want to change a file in Windows (Vista) directory but as you may know, in Vista most of files in Windows directory have full permission on TrustedInstaller group and read and execute for Users and Administrators group. My application is run as administrator but when I want to change the ownership of the file to the currently logg...

How to protect a file in Windows

Update 3: the restrict access, using the security tab works now. (that's manually) now looking to do it programatically (using Visual C#) and also how to access a file using administrator account in a simple user account. hint - I noticed this feature in Windows, right click and use 'Execute as', enter the administrator password and then...

scp file not setting correct owner

Does SCP have a problem setting file permissions or have I misconfiguration my server? Updated (19/Mar/09): Actually: There is no problem - I have just misunderstood the way permissions work - they don't change when the file contents are changed Use case: There is a file on a server that I want to edit called "importantFile.txt". The ...

IIS 6.0 Access Permissions to Remote Share

When setting up a virtual directory under IIS using a UNC path to a remote share, what user identity should I be expecting to see the read request to the share come under? I've setup the above scenario and configured the user under 'Connect As' as a known user who has permissions on the remote share, which I checked with Windows Explore...

php fopen doesn't open the file, it permission to read is not given to the world/public?

the php fopen fails to open a file for reading, if the file permission is 440. I don't want to give 444 permission to the file, so that it can't be accessed directly through a URL. ...

Why can I run a Bash function with the 000 permissions?

It is not totally rigth that I can run a Bash function with 000 permissions, but almost. My code is: #!/bin/bash function hello { echo Hello! } The hello-file has permissions: -r-------- 1 UnixBasics hello_file Firtsly, I type with the current permissions: $ . ./hello_file;hello The tweak is to change the 400 permissions to 00...

ASP.NET Writing PDF to filesystem

I have a report that I currently allow the user to choose an output option (HTML or PDF) when they are supplying the report parameters (date range, filters, etc.). I want to change the report such that it always does HTML and puts a link on the rendered HTML page so the user can grab the PDF if they want it. How do I modify my IIS6/IIS...

How to control the file permissions when the netbeans php plugin uploads a file with FTP.

Whenever netbeans preforms an ftp upload the files are uploaded with the permissions set to 640. This causes PHP to throw the following error: Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required '/Library/WebServer/Documents/notes/index.php' (include_path='.:/usr...

IIS File Permissions

Hello all, I have an app which I'm trying to restrict permissions to while I'm doing maintenance. I use windows file permissions and remove access to the dll file the app runs from for all non admin accounts, ie: cacls "%DLL_LOC%" /E /R BUILTIN\Users and then I recycle the application pool (which was working on my dev environment to...

How can I exclude all "permission denied"-messages from "find ."?

I need to hide all "permission denied"-messages from: find . > files_and_folders I am experimenting when such message arises. I need to gather all folders and files, to which it does not arise. Is it possible to direct the permission levels to the files_and_folders-file? How can I hide the errors at the same time? ...

Permissions in Vista

I am making a call to: config.Save(ConfigurationSaveMode.Modified); and this call works fine in Windows XP. When I run it in Vista I get: Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Configuration.ConfigurationErrorsException: An error occurred loading...

Linux directory permissions read write but not delete

Is it possible to setup directory permissions such that a group is able to read and write files and subdirectories but not delete anything? ...

how to change the ACLs from c++?

how to change the ACLs from c++? can anyone help me to do the folowing from c++ without any confirmations: cacls c:\personal\file.txt /d everyone ? ...