Windows 7 to XP file sharing: some files are accessible in a folder,some are not

  • Thread starter Thread starter Yousuf Khan
  • Start date Start date
Y

Yousuf Khan

I have a Windows 7 desktop that's sharing several folders out to other
computers, mainly running XP. That's pretty typical, and I'm not having
any problem setting this up, it's already setup and working fine.

However, recently I added a new folder share from the Windows 7
computer. What I'm finding is that some of the files in the folder are
accessible, and some are not. It's unusual because typically I see
either that the whole folder is accessible, or it is not, not just some
things inside it. I'd say half are accessible, and half are not.

When trying to access some files, I get the message: "file not
accessible". Yet, I can see all of these files when viewing the
directory listing in Explorer. What could be causing this?

Yousuf Khan
 
Yousuf Khan said:
I have a Windows 7 desktop that's sharing several folders out to
other computers, mainly running XP. That's pretty typical, and I'm
not having any problem setting this up, it's already setup and
working fine.

However, recently I added a new folder share from the Windows 7
computer. What I'm finding is that some of the files in the folder
are accessible, and some are not. It's unusual because typically I
see either that the whole folder is accessible, or it is not, not
just some things inside it. I'd say half are accessible, and half
are not.

When trying to access some files, I get the message: "file not
accessible". Yet, I can see all of these files when viewing the
directory listing in Explorer. What could be causing this?

Since it is some files and not others, I'd check security permissions
on the files themselves. If that's not it, it might be helpful to
know what files are and are not accessible.
 
I have a Windows 7 desktop that's sharing several folders out to other computers, mainly running XP. That's pretty typical, and I'm not having any problem setting this up, it's already setup and working fine.

However, recently I added a new folder share from the Windows 7 computer. What I'm finding is that some of the files in the folder are accessible, and some are not. It's unusual because typically I see either that the whole folder is accessible, or it is not, not just some things inside it. I'd say half are accessible, and half are not.

When trying to access some files, I get the message: "file not accessible". Yet, I can see all of these files when viewing the directory listing in Explorer. What could be causing this?

Yousuf Khan

What is often a simple quick fix for this is to unshare the folder and then share it again.
HTH
 
What is often a simple quick fix for this is to unshare the folder and then share it again.
HTH

Okay, just tried that, and it did work -- somewhat. The files that were
previously giving trouble are no longer giving trouble, but new files
that are put into this directory seem to give the trouble still. This
particular directory is a very dynamic directory, it's used mainly to
hold recently downloaded files and share them out to other computers in
the house. I'm finding that newer files give the issue. Am I supposed to
unshare the folder everytime there's a new file downloaded, and reshare it?

There's no other Windows 7 computers in the house to test this out on,
apart from the main desktop. When I attempt to mount this computer's own
filesystem as a network share, it works fine, but that's obvious. I
don't know if it's working fine because it's sharing to Windows 7 or if
it's running fine because the network share is actually a local
filesystem. I can only test remotely to an XP computer.

Yousuf Khan
 
Okay, just tried that, and it did work -- somewhat. The files that
were previously giving trouble are no longer giving trouble, but
new files that are put into this directory seem to give the
trouble still. This particular directory is a very dynamic
directory, it's used mainly to hold recently downloaded files and
share them out to other computers in the house. I'm finding that
newer files give the issue. Am I supposed to unshare the folder
everytime there's a new file downloaded, and reshare it?

There's no other Windows 7 computers in the house to test this out
on, apart from the main desktop. When I attempt to mount this
computer's own filesystem as a network share, it works fine, but
that's obvious. I don't know if it's working fine because it's
sharing to Windows 7 or if it's running fine because the network
share is actually a local filesystem. I can only test remotely to
an XP computer.

Yousuf Khan

You say that you are moving files into this shared folder. When
files are _moved_ within the same disk volume, the files retain their
original file protections. So if you move a file that was created in
an area where only you have permissions to it into a shared folder,
it will retain permissions for only you to access it.

The simple solution is to "copy" a file into the shared folder
instead of "moving" it (drag it with the right mouse button instead
of the left button). When copying the file, the copy will be
assigned the permissions of the containing folder which is probably
what you desire.

The following applies to XP but likely is the same for Windows 7.
"How permissions are handled when you copy and move files and
folders"
< http://support.microsoft.com/kb/310316 >

HTH,
JW
 
You say that you are moving files into this shared folder. When
files are _moved_ within the same disk volume, the files retain their
original file protections. So if you move a file that was created in
an area where only you have permissions to it into a shared folder,
it will retain permissions for only you to access it.

Not really, files are coming into this directory after being downloaded
from the Internet, but they didn't actually exist anywhere else within
this computer before they came to this directory.

However, when I started having these problems, in order to test out the
problem, I did begin to copy in files into this folder from elsewhere,
both from remote locations and locally. However, the problem was already
present even before any new files were copied or moved in.
The simple solution is to "copy" a file into the shared folder
instead of "moving" it (drag it with the right mouse button instead
of the left button). When copying the file, the copy will be
assigned the permissions of the containing folder which is probably
what you desire.

None of the files had any unusual permissions beforehand, and neither
did this directory. Certainly nothing that would prevent them from even
being read. So whether it was copied in or moved in, should be
irrelevant as everything should be readable at the very least. And the
fact that there are some files in this directory that are readable is a
sign of this.

Yousuf Khan
 
Yousuf Khan said:
Not really, files are coming into this directory after being downloaded
from the Internet, but they didn't actually exist anywhere else within
this computer before they came to this directory.

However, when I started having these problems, in order to test out the
problem, I did begin to copy in files into this folder from elsewhere,
both from remote locations and locally. However, the problem was already
present even before any new files were copied or moved in.


None of the files had any unusual permissions beforehand, and neither did
this directory. Certainly nothing that would prevent them from even being
read. So whether it was copied in or moved in, should be irrelevant as
everything should be readable at the very least. And the fact that there
are some files in this directory that are readable is a sign of this.

Yousuf Khan

I agree with JW's suggestion. I was having similar problems accessing files
on my XP share from Win7 (didn't matter what type- pictures, zip files,
executables, whatever), and found that if I downloaded my files to a
temporary location and then copied them to my XP share, I could access them
from Win7 with no problem. But if I downloaded them directly to the XP
share, or moved them to the XP share, some files would produce error
messages when trying to work with them from Win7. I still have the Send To
powertoy installed on my XP machine, so that makes it very simple and easy
to copy the files I want to share. Once I'm sure they're accessible from
Win7, I delete them from the temporary location.

I agree with your last paragraph- I didn't see any unusual properties in
these files, but the simple act of copying instead of moving made them
readily accessible to both machines. Things that make you go huh. . .

Just my 2 cents worth :-)
 
The following applies to XP but likely is the same for Windows 7.
"How permissions are handled when you copy and move files and
folders"
< http://support.microsoft.com/kb/310316>

Okay, looking through the permissions, I'm finding that the files that
were having trouble being read were the ones that didn't have the
"Everyone" user group in the list of users. The folder itself has
"Everyone" on its list of allowed access. I would've thought that since
the folder itself had "Everyone" on its access list, that everything
inside this folder would inherit this user group too.

So I did try the "copy" vs. "move" thing, and it does look like when
using "copy" all of the destination folder's permissions are honored,
but when moving, it isn't.

Now is there a bulk (command-line) way to fix the permissions on these
files?

Yousuf Khan
 
Now is there a bulk (command-line) way to fix the permissions on
these files?

The CACLS utility is designed for that:

C:\>CACLS /?
Displays or modifies access control lists (ACLs) of files

CACLS filename [/T] [/E] [/C] [/G user:perm] [/R user [...]]
[/P user:perm [...]] [/D user [...]]
filename Displays ACLs.
/T Changes ACLs of specified files in
the current directory and all subdirectories.
/E Edit ACL instead of replacing it.
/C Continue on access denied errors.
/G user:perm Grant specified user access rights.
Perm can be: R Read
W Write
C Change (write)
F Full control
/R user Revoke specified user's access rights
(only valid with /E).
/P user:perm Replace specified user's access rights.
Perm can be: N None
R Read
W Write
C Change (write)
F Full control
/D user Deny specified user access.
Wildcards can be used to specify more that one file in a command.
You can specify more than one user in a command.

Abbreviations:
CI - Container Inherit.
The ACE will be inherited by directories.
OI - Object Inherit.
The ACE will be inherited by files.
IO - Inherit Only.
The ACE does not apply to the current file/directory.
 
The CACLS utility is designed for that:

C:\>CACLS /?
Displays or modifies access control lists (ACLs) of files

Yeah thanks, I found that out too after I posted it. Looks like in XP
it's CACLS, while in Windows 7 it's ICACLS.

Yousuf Khan
 
I have a Windows 7 desktop that's sharing several folders out to other
computers, mainly running XP. That's pretty typical, and I'm not having
any problem setting this up, it's already setup and working fine.

However, recently I added a new folder share from the Windows 7
computer. What I'm finding is that some of the files in the folder are
accessible, and some are not. It's unusual because typically I see
either that the whole folder is accessible, or it is not, not just some
things inside it. I'd say half are accessible, and half are not.

When trying to access some files, I get the message: "file not
accessible". Yet, I can see all of these files when viewing the
directory listing in Explorer. What could be causing this?

Yousuf Khan

Okay, so now that I've discovered files weren't inheriting the
"Everyone" user group from the directory, I started explicitly adding
this user group to each of the new files. But of course this is
inconvenient. I started looking for a way to allow the new files to
inherit these access rights from the parent directory. It's not easy,
it's buried down deep in Advanced Permissions.

So this link might help out:

Changing Permissions in Windows 7 - Neowin Forums
http://www.neowin.net/forum/topic/883534-changing-permissions-in-windows-7/

Yousuf Khan
 
Back
Top