permissions

PHP: How to check if a directory is writeable?

Does anyone know a good way to check to see if a directory is writeable? The function is_writable doesn't work for folders. ...

How do you set directory permissions in NSIS?

I'm trying to build a Windows installer using Nullsoft Install System that requires installation by an Administrator. The installer makes a "logs" directory. Since regular users can run this application, that directory needs to be writable by regular users. How do I specify that all users should have permission to have write access to ...

Starting a process in C# with username & password throws "Access is Denied" exception

Inside a .NET 3.5 web app running impersonation I am trying to execute a process via: var process = new Process { StartInfo = { CreateNoWindow = true, FileName = "someFileName", Domain = "someDomain", Username = "someUserName", ...

GetProcessesByName() and Windows Server 2003 scheduled task

Does anybody know what user privileges are needed for the following code needs to successfully execute as a scheduled task on Windows Server 2003: System.Diagnostics.Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName) When NOT running as scheduled task i.e. under a logged in user, as long as the user is a member of "Pe...

Can't copy file with appropriate permissions using FileIOPermission

Hello, This snippet works well if I try to write in a user directory but as soon as I try to write in Program Files, it just executes silently and the file has not been copied (no exception). If I try to copy the file in C:\ or in C:\Windows I catch an UnauthorizedAccessException. Do you know another way to get the permissions to writ...

How can I setup the permissions in Linux so that two users can update the same SVN working copy on the server?

My server has both Subversion and Apache installed, and the Apache web directory is also a Subversion working copy. The reason for this is that the simple command "svn update /server/staging" will deploy the latest source to the staging server. Apache public web directory: /server/staging — (This is an SVN working copy.) I have two use...

Very slow response for Visual Studio 2005 Web Site Administration Tool

I am working on an ASP.NET application and am trying to add user authentication. As a first step, I am using the Web Site Administration tool (Website | ASP.NET Configuration) to manage users and permissions. Accessing this website is incredibly slow. To load the main page takes 30 seconds. When navigating to the Security page (also ...

Why does subversion chown/recreate files on checkin?

I have a personal wiki that I take notes on. The wiki's pages are in a subversion working copy directory, "pages", and I set their permissions to 664, owned by www-data:www-data. My username is in the "www-data" group, so I can checkin and mess with the pages manually. For a while, I had an issue because every time I ran a checkin, th...

Can I listen on a port (using HttpListener or other .NET code) on Vista without requiring administrator priveleges?

I'm using HttpListener to allow a user to set up a proxy on a user-defined port. When I start the HttpListener, I get an exception if the application isn't running under administrator privileges in Vista. From what I've read, this is expected behavior - administrator privileges are required to start listening on a port. But I'm sure the...

Remove manifest permissions in Vista

Hi all, I have been developing a C# windows form application in XP. It all works just fine. But in Vista it was not able to write the log or scoreboard file to the hard drive. I found out that I needed a manifest file to allow the popup to ask it to be run as admin. This all worked well and I am very pleased. My problem is I do not...

Minimum rights required to run a windows service as a domain account

Hi all, Does anyone know what would be the minimum rights I would need to grant to a domain user account in order to run a windows service as that user? For simplicity, assume that the service does nothing over and above starting, stopping, and writing to the "Application" event log - i.e. no network access, no custom event logs etc. ...

DBCC CHECKIDENT on a temporary table throwing permissions error for wrong user

I'm logged into a SQL Server 2005 database as a non-sa user, 'bhk', that is a member of the 'public' server role only. The following code tries to execute within a stored procedure called by user 'bhk'. This line of code... TRUNCATE TABLE #Table1 DBCC CHECKIDENT('#Table1', RESEED, @SequenceNumber) WITH NO_INFOMSGS causes this error......

Best Role-Based Access Control (RBAC) database model

What is the best database schema to track role-based access controls for a web application? I am using Rails, but the RBAC plugin linked by Google looks unmaintained (only 300 commits to SVN; latest was almost a year ago). The concept is simple enough to implement from scratch, yet complex and important enough that it's worth getting r...

Where are the best locations to write an error log in windows?

Howdy, Where would you write an ErrorLog.txt file in Windows? Keep in mind the path would need to be open to basic users for file write permissions. I know the eventlog is a possible location for writing errors, but does it work for "user" level permissions? Thank you, Keith EDIT: I am targeting Windows 2003, but I was posing the...

Change permissions upon uploading with scp

I am uploading files to my shell account using scp. As I need different permissions on the server than on my computer, I'd like to have a way to easily change the permissions upon upload without needing to ssh to the account and change them manually. ...

Lucene.Net fails at my host because it calls GetTempPath(). What's the work around?

I'm using Lucene.Net in an ASP.NET application on a shared host. Got this stack trace shown below. What's the work around? [SecurityException: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.] System.Security...

Running compiled python (py2exe) as administrator in Vista

Is it possible to programaticly run compiled Python (comiled via py2exe) as administrator in Vista? Some more clarification: I have written a program that modifies the windows hosts file (c:\Windows\system32\drivers\etc\hosts) in Vista the program will not run and will fail with an exception unless you right-click and run as administrat...

Why do I get "permission denied" in PHP when trying to rename a directory?

I chmod'ed the directory to 777, same with the directory contents. Still, I get a "permission denied" error. Does PHP throw this error if apache is not the group/owner, regardless of the file permissions? Here's the call that's failing: rename('/correct/path/to/dir/1', '/correct/path/to/dir/2'); ...

Code for checking write-permissions for directories in Win2K/XP

Greetings! I am trying to check directory write-permissions from within a Windows MFC/ATL program using C++. My first guess is to use the C-standard _access function, e.g.: if (_access("C:\mydir", 2) == -1) // Directory is not writable. But apparently on Windows 2000 and XP, _access can't determine directory permissions. (i.e. the...

What is the best way to manage permissions for a web application - bitmask or database table?

I'm considering the best way to design a permissions system for an "admin" web application. The application is likely to have many users, each of whom could be assigned a certain role; some of these users could be permitted to perform specific tasks outside the role. I can think of two ways to design this: one, with a "permissions" tabl...