file-permissions

Check file permissions

How can I check file permissions, without having to run operating system specific command via passthru() or exec()? ...

What is the proper virtual directory access permission level required for a SOAP web service?

When setting up a new virtual directory for hosting a SOAP web service in IIS 6.0 on a Server 2003 box I am required to set the access permissions for the virtual directory. The various permissions are to allow/disallow the following: Read Run scripts (such as ASP) Execute (such as ISAPI or CGI) Write Browse The SOAP web service is ...

Storing file permissions in Subversion repository

How do you store file permissions in a repository? A few files need to be read-only to stop a third party program from trashing it but after checking out of the repository they are set to read-write. I looked on google and found a blog post from 2005 that states that Subversion doesn't store file-permissions. There are patches and hook-...

Not able to delete directory

I am having a frequent problems with my web hosting (its shared) I am not able to delete or change permission for a particular directory. The response is "Cannot delete. Directory may not be empty". I checked the permissions and it looks OK. There are 100s of files in this folder which I dont want. I contacted my support and they solv...

Open a file with su/sudo inside Emacs

Suppose I want to open a file in an existing Emacs session using su or sudo, without dropping down to a shell and doing sudoedit or sudo emacs. One way to do this is (require 'tramp) C-c C-f /sudo::/path/to/file but this requires an expensive round-trip through SSH. Is there a more direct way? [EDIT] @JBB is right. I want to be able ...

Enumerate Windows network shares and all custom permissions on or within

We have various servers that have many directories shared. It's easy enough to look at the share browser to see what the "top level" shares are, but underneath is a jumbled mess of custom permissions, none of which is documented. I'd like to enumerate all the shares on the domain (definitely all the 'servers', local PCs would be nice) a...

How can I programmatically determine if I have write privileges using C# in .Net?

How can I determine if I have write permission on a remote machine in my intranet using C# in .Net? ...

How do I change read/write mode for a file using Emacs?

If a file is set to read only mode, how do I change it to write mode and vice versa from within Emacs? ...

Can I simply 'read' a file that is in use?

I am trying to use a StreamReader to read a file, but it is always in use by another process so I get this error: The process cannot access the file '\arfjwknasgmed17\C$\FLAG CONDITION\CP-ARFJN-FLAG.XLS' because it is being used by another process. Is there a way I can read this without copying it? Or is that my only option?...

Halt storage access?

I am trying to construct a way to keep certain hard drive partitions/usb drives from being accessed for security reasons (protecting intellectual property). I was thinking that when windows attempts to access the "locked down drive/usb" the attempted is halted and returns something like "drive inaccessible" or something. It's just an ide...

Can I make a folder writeable in Medium trust?

My web app writes to several folders (logs, uploads, etc), and I've always set these permissions manually through my hosting provider. I'd like to create a setup script that performs this on new installations. Is this possible under Medium trust? I can't even call File.GetAccessControl, let alone File.SetAccessControl, but I don't nee...

Nant : change file permission

Hi ! I have an ASP.NET application. Basically the delivery process is this one : Nant builds the application and creates a zip file on the developer's computer with the application files without SVN folders and useless files. This file is delivered with a Nant script. The zip and nant files are copied to the client's computer the Nant...

Setting Folder permissions on Vista.

I am trying to set the permissions of a folder and all of it's children on a vista computer. The code I have so far is this. public static void SetPermissions(string dir) { DirectoryInfo info = new DirectoryInfo(dir); DirectorySecurity ds = info.GetAccessControl(); ds.AddAccessRul...

Exclusive File access to logfile with VBScript and Filesystemobject

Need help with this one. I have a VBS script that currently writes to a logfile. This script can be kicked off my multiple simultaneous processes so now I'm worried about concurreny. I'm currently using the FilesystemObject to open and write to this file. Does FSO support exclusive file access? Thanks in Advance ...

Permission Denied errors with Visual Studio 2008 under Vista

I've taken the plunge and upgraded (or maybe downgraded?!) from WinXP to Vista. Everything appeared to be working ok except that when I fired up my machine this morning and opened my C# application in Visual Studio I got a few "Load of property 'OutputPath' failed. The entered path is not a valid output path" errors. I tried to rebuild...

File Security on Windows Vista with .NET Installer

I am trying to write an installer (by creating a .vdproj) that will work on both Windows Vista and XP. The only thing I am finding is that when I try to run it on Vista, the files that I include in the installer are installed with Read-only permissions for the Users groups. This is a problem because the application needs to read/write ...

What do i use on linux to make a python program executable

Hi, I just installed a linux system (Kubuntu) and was wondering if there is a program to make python programs executable for linux. Thanx in advance :) ...

How to have read permission in a recent created folder and file in C?

Hi, I've created a a folder and after I open a file inside of that folder a write on it. It happens that after that I try to open the file but I have no permissions thus I have to change it manually. /* str1 has tha name of the folder */ /* str the bytes I want to write in the file inside the folder*/ ... mkdir(str1,0777); if...

Directory/File Permission Issue

Hello, I wrote code to set permission of the folder. Function I developed was public void SetPermission(string user,FileSystemRights rights) { DirectoryInfo dInfo = new DirectoryInfo(folderPath); DirectorySecurity oDirectorySecurity = new DirectorySecurity(); oDirectorySecurity.AddAccessRule(new FileSystemAccessRule(user...

vbscript : fso.opentextfile permission denied

In my code segment, when I script the file name, it gives me a permission denied on the following line: Set objTextFile = objFSO.OpenTextFile(strDirectory & strFile, ForAppending, True) Here is the script 'output log info Function OutputToLog (strToAdd) Dim strDirectory,strFile,strText, objFile,objFolder,objTextFile,objFSO ...