Find the answer to your Linux question:
Results 1 to 9 of 9
Hi All, My apologies if GNU Linux qualfies a different forum, but I did not see it up on the boards. My question is a relatively easy one- I have ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2012
    Posts
    6

    GNU Linux- What is the startup file??


    Hi All,

    My apologies if GNU Linux qualfies a different forum, but I did not see it up on the boards.
    My question is a relatively easy one- I have a website which runs on GNU Linux and I want to determine if there is a Linux script file which executes every time the website is accessed by the http:www address.

    I know about .htaccess, but I'm looking for any file(s) which executes BEFORE the .htaccess file executes.
    I have edit access to .htaccess but something is causing problems with that file and I want to be able to access the point before this script executes.
    Are there any files that run before this one? Thanks much for any help.


  2. #2
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,653
    Gnu/Linux or Linux; it's the same thing (may Richard Stallman forgive me)

    Well anything before that will require root access to the server and is probably deep in the web server config files. Maybe we can help you solve the problem if you let us know what it is...

    Also moved to servers where you may get more appropriate views.
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  3. #3
    Just Joined!
    Join Date
    May 2012
    Posts
    6
    major Bummer the problem is the file .htaccess keeps getting overwritten by a rouge process and corrupted.
    I have been fighting with my IP support for 3-4 days now and they can't figure out the cause, so my website is toast. I have to manually go in and recopy the .htaccess file each time.
    If I could access a unix file that executes before .htaccess, I could enter a line to copy a good .htaccess file over every time the website is accessed. Its a band-aid, but at least it would get my website up and running at present (and while I'm paying for the site to be hosted, I might add).

  4. $spacer_open
    $spacer_close
  5. #4
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,653
    Is this a wordpress site? If so don't make your changes between the # BEGIN WordPress and # END WordPress comments
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  6. #5
    Just Joined!
    Join Date
    May 2012
    Posts
    6
    no, its Fish4Tips fish4tips.com

    I'll fix it now and in about a half hour, .htaccess will go corrupt and it will say, "The website you were trying to reach is temporarily unavailable." again

  7. #6
    Just Joined!
    Join Date
    May 2012
    Posts
    6
    The only thing I could do is put the fix in another website.
    If you visit jandjvault.com first, then go to fish4tips.com, the error will be fixed and fish4tips.com will work for about 15 minutes or so, until .htaccess goes corrupt again.
    Basically I just put a line in to copy over the bad .htaccess every time you visit jandjvault.com.

  8. #7
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,653
    A temporary solution may be to make the .htaccess writeable only by yourself. You can usually do this in your FTP client. The permissions are 644 or -rw-r--r--. In the meantime I would examine the site carefully looking for malicious scripts that have been uploaded. Start by looking for PHP code that uses eval() or base64_decode()
    Last edited by elija; 05-23-2012 at 10:24 PM. Reason: Gotta love a cat hitting the enter key.
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  9. #8
    Just Joined!
    Join Date
    May 2012
    Posts
    6
    I set it to r--r--r-- and it still gets corrupted, and then of course the other fix doesn't work either.
    If only there was a script file that ran every time before .htaccess I could edit, I could add the fix line to that and be done with it.

  10. #9
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,653
    Can you post the contents of the corrupted file?

    Edit: Have a read of this
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •