Windows XP local network sharing: 1GB .zip file is blocked; seeing "Access Denied" on copy?

2

I have two computers on our local network both running Windows XP. My main computer has local network sharing setup for \etc\install.

I have a folder with two 1GB .zip files, one of which I've had for a while, and one of which is new -- let's call them OLD.zip and NEW.zip. Using Windows Explorer drag & drop, I'm trying to copy the new file NEW.zip from my main computer to my lab computer. But it won't work; I get an error message:

Cannot copy NEW.zip: Access is denied.

Make sure the disk is not full or write-protected and
that the file is not currently in use.

which is really odd, because I don't get that error message when I try to copy OLD.zip; it works fine. (And there's 38GB free on my lab computer hard drive, so I'm not running out of space.)

I've tried restarting my main computer, and it still has the problem.

What could be causing this, and how can I fix it?

Jason S

Posted 2011-12-21T21:52:47.383

Reputation: 5 983

Yes, that error message will help :-) Also, how are you trying to copy the file? Via the Windows Explorer drag & drop, or some other way? – Chris W. Rea – 2011-12-21T21:56:23.030

Windows explorer drag & drop. – Jason S – 2011-12-21T21:58:26.410

I just tried the equivalent operation in a command prompt, and I get Access is denied. I can't figure out why this would be the case; there's no obvious sign of permissions being set specially for NEW.zip when everything else seems to be accessible from my lab computer. – Jason S – 2011-12-21T22:00:09.853

One more thing before I try to answer. Using your main computer only (no network copy), is it possible for you to copy NEW.zip to, say, Copy of NEW.zip, or do you also see an error in that case? – Chris W. Rea – 2011-12-21T22:01:07.580

good question, trying it now.... – Jason S – 2011-12-21T22:01:35.013

If that works, then try copying the resulting Copy of NEW.zip over the network to the lab computer. If that ends up working, let me know. I'll summarize the likely reason in an answer. – Chris W. Rea – 2011-12-21T22:03:15.890

My main computer can make a local copy w/o problems. – Jason S – 2011-12-21T22:03:18.103

Hey, that works! Why????!? – Jason S – 2011-12-21T22:04:09.363

Answers

4

It likely is a permission issue, but here's why it might be confusing. What I'm assuming might have happened is the following:

  • You originally had the NEW.zip file in a location with more restrictive permissions (at the NTFS level) such that the network user attempting the copy wouldn't have access.
  • You moved the NEW.zip file to the network-accessible folder having less restrictive permissions for the network access, fully intending for the file to be accessible to the network user.
  • However, when files are moved in Windows on the same drive, they retain their previous permissions. Refer to this Microsoft KB article. Quote:

By default, an object inherits permissions from its parent object, either at the time of creation or when it is copied or moved to its parent folder. The only exception to this rule occurs when you move an object to a different folder on the same volume. In this case, the original permissions are retained.

  • In copying the file locally within the same folder to Copy of NEW.zip, you reset the permissions to inherit from the parent folder (the less restrictive ones)
  • Thus, you could copy the copy of the file, but not the original still retaining the more restrictive permissions.

I see this happen often at work, when some of the less experienced developers extract a ZIP archive to their desktop, then move the folder to wwwroot\inetpub, and then are puzzled why they can't access the folder via their web server. All because permissions move with a moved item when on the same drive. Copies (or moves across drives) get a new set of permissions from the parent folder.

Does that make sense? Is that the likely scenario here?

Chris W. Rea

Posted 2011-12-21T21:52:47.383

Reputation: 10 282

bizarre. That sounds like it was the case -- originally this was downloaded from a web browser in My Documents/Downloads and I moved it to a subdirectory of my share root \etc\install. I could have sworn I checked the permissions on the .zip file itself (vs. its container directory), but maybe I missed that. – Jason S – 2011-12-21T22:10:30.337

We're all human :-) – Chris W. Rea – 2011-12-21T22:12:50.117

I see this all the time myself. For the more technical users at work, I explain it a different way: If a file is hardlinked to two different folders, which folder is it suppose to inherit permissions in the first place? Thus they realize that the object first inherits permission on creation. – surfasb – 2011-12-22T00:40:52.510