in reply to Another Strange Win32::Perms Issue

It's a tall order to try and reason out that problem purely from the description. Replicating the behaviour outside of your setup would be near impossible. However, there are a few question you could try to answer that may shed some light.

You say that "I have run this script many times on a few different machines and have found that the problem only occurs in one directory." and "The directory in question is a shared directory".

Does that mean that it is the same directory on the same machine that is being shared to all of your test machines via the network? If so

Essentially, you need to try and isolate what it is that is different about that directory or machine from the other directories. For example; is that machine running a different (version of the) OS? Have you checked the event log (assuming its Win) on that machine? Maybe there is a problem with the browser deamon, or the the filesystem that has errors which are slowing things down.

You might even look for things like the connection speed of the lan segment to which the shared directory is connected. If the machine in question was using a 4MB NIC or a was connected through a slow or overloaded router it might produce some slow down. A few point to point tests of network speed from the command line to the problem share should determine this.

Is the machine where the directory in question in the same domain as the test machines? I've seen a situation in the past where accounts in one domain accessing a machine in a different domain were authorised to do so, but the process of authentication required a tortuous negotiation path between several domain controllers each time. Worth a mention.

A few ideas that spring to mind. As a first pass, I would probably replicate the problem directory to a different machine and redirect the share and see if that effects a difference. It's all about trying to isolate the differences.

Good luck.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
Hooray!

Replies are listed 'Best First'.
Re: Re: Another Strange Win32::Perms Issue
by ChrisR (Hermit) on Oct 28, 2003 at 21:47 UTC
    All very good questions:
    Is it the only directory you are accessing as a share?
    Is it the only share you are accessing on that machine?
    Does the problem go away of you run the program on that machine?
    The script is running on the same machine as the files I am checking. The files are located in many different directories (most of them are shared) but again, I am accessing them directly from the machine they reside on.

    I suppose I will copy the files to a FAT volume, remove the share, delete the directory and then recreate the directory and share and then copy the files back in and see what happens. Thanks for your in depth reply.

      Another thought crosses my mind. Is it possible that the files in that directory were created (and therefore owned) by people accessing the machine across the LAN or WAN? It strikes me that if they are, then obtaining ownership information could require consultation with the domain controllers where the owners 'live'. If that meant that the local machine was having to send queries to WAN remote PDC's, then that could intrduce quite long delays.

      Note: This is pure speculation.


      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "Think for yourself!" - Abigail
      Hooray!

        I thought about that too so I took ownership of all files in that directory. That is the local administrator's account took ownership. Also we have other files that are owned by members of the other domains but I've not noticed any slowness there. Good idea though.

        After copying the files to a FAT volume, the script runs fine. I copied the files back to the NTFS volume and the script ran fine. I recreated the share reset the permissions and the script runs gets slow again. At least now I know the problem lies in the sharing or permissions and I can work with that. Thanks very much.