Friday, January 21, 2011

recommend a Satelite internet provider

A part of our team is in Afghanistan and they are now asking me to find an internet solution for their office. The only option I can think of is satellite internet access, but unfortunately I do not have any experience with equipment like that. So I am asking you to recommend some one who can cover Middle East, who is also connected with Europe because that is where our main office is located. Allowing us to easily make payments and agreements.

We do not have a need for a super stable and fast link, a 2MB upload and 512KB download will be just fine for our purposes.

  • For a project I was involved with in Mosul Iraq we used Horizon Satellite Services. It was only a 512kbs/512kbs connection, but I am almost positive they offer up to 2MB service. The connection, though horribly latent (who would have guessed), was very stable. However they are based out of Dubai, but have some sort of presence in Germany. Hope this helps you in some way.

    adopilot : of course it help, Subquestion Did you bought equipment from they or somewhere else, And if is not secret whet is approximate price for this kind of link
    ITGuy24 : I think it was about $10k for the hardware and around $400/month. Not cheap.
    Dave M : Using something like a Riverbed Steelhead WAN accelerator on the link might help. Depends on your traffic but have heard of users with satellite links getting great results.
    From ITGuy24
  • You wont see that kind of upload speed on a satellite internet connection. You can get about a 10th of the download speed for upload. The ones I have dealt with are incredible slow and it was sometimes easier to just dial-up into the site. The latency is what makes it so slow.

    ITGuy24 : Your right about latency being an issue, but so long as the traffic doesn't timeout it's not a huge issue. As for speed I know Hughes Net offers up to 5Mbs (could be higher now) and most satallite connections upload speed can be picked. It's not uncommon to have a fast upload then down.
    xeon : Hmm. Thanks for the information. Didn't know you could actually get decent upload. Looks like a max upload would be 10Mbps.
    From xeon

Changing Permissions on a Windows Share from Linux?

I haven't the slightest idea is this is possible, though I believe it is not.

I would like a Linux client to be able to change permissions on folders on a Samba share on an NT (or Windows 2000, or something) server. Is this possible, assuming the user who is accessing has sufficient privileges?

If so: From the command-line, how would this happen on OSX and on Linux?

Note: For clarity, the server with the share is Windows. The client accessing the share is Linux. Something other than Samba could also be considered, if someone has a better idea :)

  • There are programs that can do this such as RTMSHARE from the Windows Resource Toolkit or SetACL (search sourceforge), but neither would run on OS X or Linux natively. You could investigate running them in a virtual environment on OS X or Linux. Alternatively, if the Windows machine you are attempting to modify allows remote login, you could install it and run it remotely.

    quack quixote : alternately these tools might run under WINE (instead of a full virtualmachine).

Apache ProxyPass not serving php properly

I've configured Apache to proxy all requests to foo.bar.com except for the the alias /bazbar. The proxy portion of the configuration works and the proxy pass portion works except that it serves the index.php as a plain text file.

How can I get Apache to serve the php files properly? Here is my configuration.

<VirtualHost *:80>
  ServerName foo.bar.com
  Alias /bazbar /var/www/bazbar

  ProxyPreserveHost On

  ProxyPass /bazbar !

  <Location /bazbar>
    SetHandler None
  </Location>

  <Location />
    Order allow,deny
    allow from all
    ProxyPass http://localhost:8080
    ProxyPassReverse http://localhost:8080
  </Location>
</VirtualHost>

*note I have confired that php is configured properly because when I go to http://localhost/somescript.php the php renders properly

  • If you visit http://localhost:8080/ on that machine, do you get index.php served as a text file or does it run on the server? In the case of proxy, apache will simply take what it got, and feed it back to the client. My first look would be there.

    adam : http://localhost:8080 is a separate application. When I go to http://localhost/bazbar/index.php the php script is rendered properly. The problem is that http://foo.bar.com/bazbar/index.php serves index.php as plain text. Does that help clarify?
    Richard June : I misunderstood. I follow you now. Then I think the section is your problem, If you read this page: http://httpd.apache.org/docs/1.3/mod/mod_mime.html#sethandler You'll notice that you're disabling all handlers for that Location. If you remove the SetHandler directive, I think you'll find that it works.
    adam : That was it. I replaced SetHandler None with Order allow,deny and allow from all and that worked. Can you submit another answer with that suggestion so I can accept that answer? I want to make sure the answer I accept is clear for others who read this question.
  • Look at the <Location /bazbar> section. SetHandler None disables all handlers for that Location. You need to remove that directive in order for it to work as you expect.

What possible events could cause a MySQL database to revert to a previous state?

A client of mine recently had a strange event with their MySQL database. Several days ago, one database suddenly "went back in time". All the data was in the state it was in several months ago. Even most of the .MYD and .MYI files had timestamps from November.

Fortunately, the server is not in production yet, but we need to understand how it happened so it doesn't happen again.

I'm not a MySQL guru, but I couldn't think of a scenario that could cause the database to rewind like that short of restoring from a backup. What could have happened here? Where should I look for clues?

(Server is FreeBSD 6.4)

  • Nothing showing up in the logs for the time period where the reversion was believed to have happened?

    No one ran an operation that deleted records after a certain date?

    Are you looking at raw data from the database or from an application that may be filtering the output so you don't see things after a certain date?

    Any data restore from backup run, anyone playing with filesystem snapshots?

    Any scripts running to make backups that could have hiccuped?

    Who else has access to that directory with rights to copy/modify programs? You said it wasn't a production database, so are developers playing with the server, with access to version control that could have done something to the file?

    Filesystem errors showing up? Was it just the database files that were affected, no other system or user data? Logfiles?

    Bart Silverstrim : This was just a quick list of things that would go through my mind, but I realize you said the datestamps are also backdated, so I'd suspect that either someone restored the database directory, copied files back to he directory to "fix" a problem, or someone did something with filesystem snapshots to revert the system to a previous state, but those are my suspicions. Someone else more well versed in db's may have another idea, but this sounds more like someone did something accidentally or is covering something up and has admin access to the machine.
    Bart Silverstrim : At any rate as far as I know databases don't just "roll back" complete with datestamps in any database transaction or from the database engine, and it would have had to happen in a way that it doesn't cause issues with the database engine running in memory. I'm no DB admin but I would think the SQL engine would be unhappy having the active database files yoinked from under it as it was running, and so the logs should have the fallout if the database doesn't crash (and it should have had some filesystem locks since it would be open, I'd think...)
    Bart Silverstrim : Oh, and I'd also start automating a few scripts to pull up records on who was logging into the machine for the past few days to see who was in it when, and audit that with when it approximately happened to narrow down who may have done it, even accidentally. You can also grep for commands using sudo if your admins aren't using root by default. If not the case you might need to change policy for a better audit trail, or at least have a list of who has access to alter database files and such on the system.
  • # cat /etc/fstab
    # mount
    

    Maybe mysql database, along with, for example /var, was copied to separated disk and then mounted on the top of existent /var(/db(/mysql))?

How to configure vpn

What is a VPN and How it will be established ?

How do I find and delete a cron job?

I created a cron job for a wordpress plugin that i no longer want running. I am not very good at navigating around in unix. The cron job was the following:

*/10 * * * * /usr/bin/wget -O /dev/null http://ADDRESS_OF_THE_FILE >/dev/null 2>&1

Does anyone have pointers how to navigate to this cron job and delete it?

Thanks!

  • Run command

    sudo crontab -e  
    

    It will open cron jobs in text editor. Remove your line and save the file :)

    From Temnovit
  • run in console:

    crontab -e
    

    then you will get crontab opened with an editor, simply delete the line there, save the file and quit editor - that's it...

LogParser: Find all log rows where session cookie = the session cookie found in a row that had an error

Looking for examples of integrating LP into this workflow:

  1. A SQL server event indicates IIS tossed an error.
  2. SQL parses the body of the error message and generates an LP commandline that queries IIS logs to collect more information.
  3. An email is dispatched to tech support with a link to an html (or .aspx) page that would run and present LP's output.

So i think the question boils down to:

How do i hook LP upto IIS7?

EDIT: Ok...re-boiling the question. When an IIS exception is triggered I want to see all the other log rows where the session cookie is the same as the session cookie found in the error event. Yes, I could live with polling IIS logs via a scheduled task - that takes ELMAH/SQL out of the equation.

But now the question becomes: Find all log rows where session cookie = the session cookie found in a row that had an error

  • You could setup a reoccurring Windows job that interrogates the IIS logs with LP every 10 minutes or so and use the checkpoint so it only looks at the unchecked parts of the logs. It's not integrating with IIS, but might solve the problem.

    From