in reply to Re^2: Permission denied writing to Windows 10
in thread Permission denied writing to Windows 10

If he can create the file from the command line using shell redirection; there should be no reason that perl running at that exact same command prompt cannot also create/write to the file.

What you were doing was guessing, Process Monitor on the other hand would have told exactly what is happening by the interesting process where, with which args and results. In cases like those guessing is a waste of time if proper tools to tell one are already available.

  • Comment on Re^3: Permission denied writing to Windows 10

Replies are listed 'Best First'.
Re^4: Permission denied writing to Windows 10
by BrowserUk (Patriarch) on Nov 02, 2016 at 12:18 UTC
    What you were doing was guessing, ... In cases like those guessing is a waste of time if proper tools to tell one are already available.

    No I wasn't. I was offering my knowledge and experience that says: processes run from within a shell, inherit the same rights and permission as the shell has.

    Thus, as the process being run was a 6 line perl script that could not have changed it's permissions, if the OP has permissions to access the file from the command line, he will definitely have those same permissions when running that simple perl script from that same command line. Guaranteed!

    Thus, a concise, simple-to-do, guaranteed-conclusive, guaranteed-to-work-everywhere, mechanism of testing whether permissions are the issue, without the need to find, download, install and learn to use your "proper tool" that would not provide any more, nor better, nor more useful information.

    So please, take your belated, juvenile, defensive angst elsewhere and stop wasting our time.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice.