XeneX has asked for the wisdom of the Perl Monks concerning the following question:

OK, here's my situation. I have a website hosted by a web hosting company. Their server is a Win2000 server. I'm trying to get some Perl scripts running, but I'm having trouble getting my scripts to access text files. It always comes back permission denied. CHMOD doesn't seem to do anything, which I expected since their server isn't UNIX. So my question is, is there any way to remotely set permissions of Win2000 files? Perhaps through Perl, or some FTP client command...? The only alternative is to keep sending messages to the hosting company every time I add a new file. Supremely annoying. Thanks for any tips you may have!
  • Comment on Remotely setting file permissions on a Win2000 server

Replies are listed 'Best First'.
Re: Remotely setting file permissions on a Win2000 server
by tachyon (Chancellor) on Apr 12, 2002 at 12:03 UTC

    This is not a perl question so I suggest you try posting in a more appropriate forum if you want to get more help

    It basically depends on the (web)server setup. Generally a CGI will run as a low permission user (nobody) with minimal rights to do anything anywhere. WIN2000 using NTFS basically uses the UNIX file permissions model with permissions for the owner (Admin/Owner), group (Group/Workgroup) and world (Everyone). Essentially the setup you want is for your CGIs to be part of a special group say called 'text'. You then need to set up a folder /textfiles that is owned by you and part of the text group. You give full permission on this folder to yourself and R/W to the text group. You deny everyone else any permissions on this folder. You should now be able to run a CGI that can read and write to a non world readable folder and also place new files in it.

    When I say you I mean your WIN2000 Admin unless you can convince them to give you remote access.

    As for a tip -> IIS - - Apache ++. WIN2000 drag and drool, *nix raw power.

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print