This is just a quick answer to the user question. Generally someone on a web page is a user called "nobody" but this changes with different ISP's, and you'll need to check with yours to see what that user is. The Nobody person is restricted in many ways by the webserver software engine. Most of my experience is with Apache servers by the way.

If you are going to create files that need to be accessed by someone on a web page, then that's the user id the file needs to be created on. CHOWN will do that for you.

666 generally works with most files, make sure that the file is in a directory that is accessable by the web user, not just the script accessing it. This directory should be under the area the web page runs from. Otherwise you will run into access denide errors.

If you create a directory for this, make sure the permissions are okay on the directory itself. 777 is generally okay for directories, but never for files accessed by web users. I would suggest 744 for files that don't require writing acces (and none of them should) on a web site. But that's just my personal belief system there, and there are reasons for alterations.

Hope that helps, probably some of the other monks around here will send some pointers to where you can find more information on file setting and such. I know there is a good CGI write up on the subject.

and you might want to take a look at this site CGI Tutorial

webadept

My Husband ran off with my shawman, but they love me as I am -- Tori Amos

In reply to Re: create file - permission problems by webadept
in thread create file - permission problems by emilford

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.