Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Permission denied writing to Windows 10

by Discipulus (Monsignor)
on Sep 16, 2016 at 07:34 UTC ( #1171914=note: print w/replies, xml ) Need Help??


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

on such OS the path is always important:

# 64bit cmd.exe launched as Administrator (via right click runas) C:\Windows\system32>echo wrote > "c:\Program Files\_ONE.txt" C:\Windows\system32>type "c:\Program Files\_ONE.txt" wrote # Perl 32 bit C:\Windows\system32>C:\path\strP5.22-32\perl\bin\perl.exe -e "system q +q(echo WroteByPerl > $ARGV[0] ) or die $^E" "c:\Pro +gram Files\_TWO.txt" File esauriti at -e line 1. # the above error is in italian, as the OS, and means 'There are no mo +re files.' # Perl 64 bit C:\Windows\system32>C:\path\straw64\perl\bin\perl.exe -e "system qq(ec +ho WroteByPerl64bit > $ARGV[0] ) or die $^E" "c:\Progra +m Files\_TWO.txt" Accesso negato at -e line 1. # Access Denied

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^4: Permission denied writing to Windows 10
by BrowserUk (Pope) on Sep 16, 2016 at 12:25 UTC
    on such OS the path is always important:

    The path is important on any OS; if you try to write to a path where you do not have permission to write, you will fail. That's as true under Linux as it is under zOS as it is under hpux.

    The OP already demonstrated that he has permissions in the directory where he is trying to write; and indeed can write using command line redirection, and it is when trying to create that same file in that same place that Perl is failing; thus the problem is not the OS, or the path, or the permissions, but something screwed with his Perl installation.

    So please stop trying to sell your red-herrings here.


    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1171914]
help
Chatterbox?
marto should develop the 'anti-social network'
[marto]: sign up to make it impossible to be contacted online :P
[Discipulus]: karl: configuring the network is like: nmcli conn add con-name "name name" ifname eth0 type eterneth.... not so different from powersehell longness

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2017-12-14 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (389 votes). Check out past polls.

    Notices?