UNIX file permissions - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

UNIX file permissions

Unknown Guest
I have a web account that supports scripting and cgi-bin.



How can I let my Perl program read and write data to a text file, but at

the same time, I don't want anyone from being able to type the filename

into their browser and download it?



What would the file permissions be set at? What would be the permissions

of the directory where my text data file is located be set at?




Comments

  • : I have a web account that supports scripting and cgi-bin.

    :

    : How can I let my Perl program read and write data to a text file, but at

    : the same time, I don't want anyone from being able to type the filename

    : into their browser and download it?

    :

    : What would the file permissions be set at? What would be the permissions

    : of the directory where my text data file is located be set at?

    :

    :



    file perms will need to be set at 777 for cgi write

    change to somelike 400 and so only the owner can read,




    URL:http://plebian.com

  • Just to clearify some things, when I type the full pathname of a file in

    the browser address window like:

    http://www.blah.com/cgi-bin/data.txt



    What prevents me from reading this file? The permissions of the directory

    or the permissions of the file?






Sign In or Register to comment.