access denied creating executable in local folder with adminstrator account

E

eestimpson

I'm having a "freakish" problem trying to create an executable in a
particular folder of my local c: drive. Using a c# compiler I was
trying to build an executable and got the error "access denied." I
started by looking at the folder properties and saw that the read only
flag was set for the folder. I tried clearing that, but without effect
(I later found that this is a problem in Windows XP; it always shows
that flag when you view a folder's properties).

The more I investigated the problem, the stranger it got. First, it
makes no difference what I try naming the executable, or where I try
making it from. The result is always the same, "Access Denied." For
example, I've tried creating a text file and renaming it to t.exe,
copying from the console at a command prompt, copying any .exe from
another folder, and nothing works.

I've even tried copying the folder to another folder. Here, what's
interesting is that by itself, that works. But there's a twist. Here
is the relative path of the folder in which I need to create the .exe
file:
C:\...\src\Main\StartUp\Project\obj\Release

I can't create an executable until I go back to:
C:\...\src\Main\StartUp

If I copy the Debug folder to a new location, I can create an .exe
file. If I copy obj or Project, the same. But if I copy StartUp, I
can't create an .exe in any of it's subfolders (although in the StartUp
folder itself it is no problem).

A couple of final points. The folders were created by extracting a Zip
file using WinZip. I get an error when I try extracting the files from
WinZip saying that "Access Denied" when it's trying to write an
executable to the C:\...\src\Main\StartUp\Project\obj\Release folder.
If I extract to a new folder, it does the same thing. If I use another
tool like 7-Zip, it does the same.
 
P

Pegasus \(MVP\)

eestimpson said:
I'm having a "freakish" problem trying to create an executable in a
particular folder of my local c: drive. Using a c# compiler I was
trying to build an executable and got the error "access denied." I
started by looking at the folder properties and saw that the read only
flag was set for the folder. I tried clearing that, but without effect
(I later found that this is a problem in Windows XP; it always shows
that flag when you view a folder's properties).

The more I investigated the problem, the stranger it got. First, it
makes no difference what I try naming the executable, or where I try
making it from. The result is always the same, "Access Denied." For
example, I've tried creating a text file and renaming it to t.exe,
copying from the console at a command prompt, copying any .exe from
another folder, and nothing works.

I've even tried copying the folder to another folder. Here, what's
interesting is that by itself, that works. But there's a twist. Here
is the relative path of the folder in which I need to create the .exe
file:
C:\...\src\Main\StartUp\Project\obj\Release

I can't create an executable until I go back to:
C:\...\src\Main\StartUp

If I copy the Debug folder to a new location, I can create an .exe
file. If I copy obj or Project, the same. But if I copy StartUp, I
can't create an .exe in any of it's subfolders (although in the StartUp
folder itself it is no problem).

A couple of final points. The folders were created by extracting a Zip
file using WinZip. I get an error when I try extracting the files from
WinZip saying that "Access Denied" when it's trying to write an
executable to the C:\...\src\Main\StartUp\Project\obj\Release folder.
If I extract to a new folder, it does the same thing. If I use another
tool like 7-Zip, it does the same.

- Check if the problem is restricted to executables or if
it applies to all types of files.
- Check the permissions of the problem folder, by
running this command from the Command Prompt:
cacls "c:\Some Folder\Some Subfolder"
 
E

EarthStrapped

The problem is restricted to executables.

Here are the acl's for the a typical folder where I can create an
executable:
BUILTIN\Administrators:F
BUILTIN\Administrators:(OI)(CI)(IO)F
NT AUTHORITY\SYSTEM:F
NT AUTHORITY\SYSTEM:(OI)(CI)(IO)F
[MYCOMPUTERNAME]\estimpson:F
CREATOR OWNER:(OI)(CI)(IO)F
BUILTIN\Users:R
BUILTIN\Users:(OI)(CI)(IO)(special access:)
GENERIC_READ
GENERIC_EXECUTE

BUILTIN\Users:(CI)(special access:)
FILE_APPEND_DATA

BUILTIN\Users:(CI)(special access:)
FILE_WRITE_DATA

The info is exactly the same for the folders where I can not create
executables.
 
P

Pegasus \(MVP\)

EarthStrapped said:
The problem is restricted to executables.

Here are the acl's for the a typical folder where I can create an
executable:
BUILTIN\Administrators:F
BUILTIN\Administrators:(OI)(CI)(IO)F
NT AUTHORITY\SYSTEM:F
NT AUTHORITY\SYSTEM:(OI)(CI)(IO)F
[MYCOMPUTERNAME]\estimpson:F
CREATOR OWNER:(OI)(CI)(IO)F
BUILTIN\Users:R
BUILTIN\Users:(OI)(CI)(IO)(special access:)
GENERIC_READ
GENERIC_EXECUTE

BUILTIN\Users:(CI)(special access:)
FILE_APPEND_DATA

BUILTIN\Users:(CI)(special access:)
FILE_WRITE_DATA

The info is exactly the same for the folders where I can not create
executables.

I wouild now run this little test:
1. Create a test folder.
2. Confirm that the problem exists.
3. Copy c:\windows\system32\xcopy.exe to the test folder.
4. Rename xcopy.exe to xtest.exe
4. Confirm that the problem persists, by running xtest.exe
5. Run these commands:
cacls "c:\TestFolder" /e /t /c /r Users
cacls "c:\TestFolder" /e /t /c Users:F
6. Confirm that the problem persists, by running xtest.exe.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top