Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

webserver errors

  • 21-02-2003 11:33am
    #1
    Closed Accounts Posts: 59 ✭✭


    website using php, mysql, apache
    Whenever I try to write to files or read them I get an Internal Server error on Apache/1.3.24
    Does this have anything to do with permissions on the server??
    I don't really know anything about configuring permission on the server as the administrator usually sets up all that stuff...
    I have to do it myself now though
    Anyone know what the problem is??

    Thanks:confused:


Comments

  • Closed Accounts Posts: 1,414 ✭✭✭tom-thebox


    Originally posted by Fi_C**
    website using php, mysql, apache
    Whenever I try to write to files or read them I get an Internal Server error on Apache/1.3.24
    Does this have anything to do with permissions on the server??
    I don't really know anything about configuring permission on the server as the administrator usually sets up all that stuff...
    I have to do it myself now though
    Anyone know what the problem is??

    Thanks:confused:

    Hello Fi_C

    Are you editing the files as root ? Do NOT set permissions on any file that resides within your cgi-bin directory to 777 (rwxrwxrwx) --use 755 (rwxr-xr-x) instead.

    Try chomoding them to 755 or somthing

    TYPICAL PERMISSION SETTINGS:


    Executed via the web by anyone: chmod 755 (rwxr-xr-x)

    Executed only through the command line: 700 (rwx
    )

    Library files: 644 (r-wr-wr-w)

    World writable: 777 (rwxrwxrwx) -- this is not necessary on our servers and will only work on files that are placed outside of the cgi-bin directory.

    [bash]chmod 755 l33t_code.php

    Incorrect Path check this out too.. if you are using say perl
    This is a very common problem, and is easily fixed. The first line of your program needs to be the correct path to where perl is installed on your server. the path for perl in most cases is.


    #!usr/bin/perl

    Regards


  • Registered Users, Registered Users 2 Posts: 1,023 ✭✭✭[CrimsonGhost]


    Also find out what user your webserver is running as, usually nobody. If files have to be written to by scripts then they need the files to be chmod'd so that user 'nobody' can write to them. Or alternatively chown'd to 'nobody'. If you don't have admin access then you'll have to chmod 666 any files that your scripts need to write to.

    "man chmod" and "man chown" at the command prompt to get a better understanding of them.

    Hope you get it working.


  • Registered Users, Registered Users 2 Posts: 7,740 ✭✭✭mneylon



    On all servers, this path is correct:


    #!usr/bin/perl

    It's not - it's very common, but not ALL servers are setup in the same way.

    If you are getting an internal error and have checked the permissions you should have a look at the logfile if possible.


  • Closed Accounts Posts: 9 Ray Quinn


    Do the files in cgi-bin directory need to be owned by 'www-data' (or whatever apache user) ?
    Surely if they are owned by root (as they currently are on my server) and permissions are 755 it might cause problems ?
    R


  • Registered Users, Registered Users 2 Posts: 7,740 ✭✭✭mneylon


    Which cgi-bin? Your own or a central one?
    They shouldn't be owned by root - nobody or the user whose site it is usually works without causing too much damage


  • Advertisement
  • Closed Accounts Posts: 1,414 ✭✭✭tom-thebox


    Originally posted by blacknight
    It's not - it's very common, but not ALL servers are setup in the same way.

    If you are getting an internal error and have checked the permissions you should have a look at the logfile if possible.

    You will notice I referanced PERL, he did not even mention perl the path was an example.

    Regards


  • Registered Users, Registered Users 2 Posts: 7,740 ✭✭✭mneylon


    Tom have a look at your original post:
    On all servers, this path is correct:


    #!usr/bin/perl
    You may have meant to say that it was a common location, but you didn't, which is why I posted what I did.


  • Registered Users, Registered Users 2 Posts: 5,741 ✭✭✭jd


    Originally posted by Fi_C**
    website using php, mysql, apache
    Whenever I try to write to files or read them I get an Internal Server error on Apache/1.3.24
    Does this have anything to do with permissions on the server??
    I don't really know anything about configuring permission on the server as the administrator usually sets up all that stuff...
    I have to do it myself now though
    Anyone know what the problem is??

    Thanks:confused:

    What are the permissions of the directory you are trying to write to? I take it you are trying to get your script to write to a file?
    jd


  • Registered Users, Registered Users 2 Posts: 1,862 ✭✭✭flamegrill


    Originally posted by Fi_C**
    website using php, mysql, apache
    Whenever I try to write to files or read them I get an Internal Server error on Apache/1.3.24
    Does this have anything to do with permissions on the server??
    I don't really know anything about configuring permission on the server as the administrator usually sets up all that stuff...
    I have to do it myself now though
    Anyone know what the problem is??

    Thanks:confused:

    Find error_log, tail -f it view the page you are working on, see what its saying. Internal server errors with php are not very common, as typically php will just spit out the error on the page as apposed to apache actually doing. Me thinks it could be a configuration error of php with apache.

    try this:

    <?

    phpinfo();

    ?>

    in a test file, if that doesn't run then apache/php are not setup correctly.

    let us know,

    Paul


  • Registered Users, Registered Users 2 Posts: 5,741 ✭✭✭jd


    Originally posted by jd
    What are the permissions of the directory you are trying to write to? I take it you are trying to get your script to write to a file?
    jd
    One other thing-does the file already exist?
    You may have to create it before you write to it..I had this erroronce..some time ago...


  • Advertisement
  • Closed Accounts Posts: 59 ✭✭Fi_C**


    thanks a lot ppl..;)
    Everything is workin fine now!!
    I set the right permissions and can read and write to file now no prob!!
    However the inernal error actually had nothing to do with Apache and php config ... mysql server and apache were actually that problem.
    This site is really wreckin my head it's just one problem after another --- oh well at least I'm learnin stuff I s'pose:rolleyes:
    Thanks.


  • Closed Accounts Posts: 1,414 ✭✭✭tom-thebox


    Its the best way to learn. Hang in there.



    Kindest Regards


Advertisement