LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-10-2016, 02:11 AM   #1
pantha_ashish
LQ Newbie
 
Registered: Feb 2016
Posts: 2

Rep: Reputation: Disabled
Having problem when extract the package xxxxxxx.tar.gz


I'm using centos6 ,and I have encountered a problem when I extract the package that I have downloaded.....

this is what happened...
when I extracted the package....

[root@dhcppc2 ~]# tar xvzf snortrules-snapshot-2962.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
[root@dhcppc2 ~]#

how can I fix this problem?
can you give me some step on how to solve it?
 
Old 02-10-2016, 02:26 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,769

Rep: Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052
I would check that your download completed correctly. By the look of it the file is not complete and hence gzip is not able to identify the file correctly.
 
Old 02-10-2016, 03:31 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,465

Rep: Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606
Quote:

how can I fix this problem?
can you give me some step on how to solve it?
FIRST
Step #1
DO NOT use the root account !!!!!!!!!!!

you really DO NOT want to unzip a tar ball AS root
-- this is a very BAD IDEA


use your NORMAL user account


second
#2
where did you get this "snortrules-snapshot-2962.tar.gz" from ?

the CURRENT on the snort site is 2980
https://www.snort.org/downloads


also snort should be in the cent repos
Code:
su -
yum search snort
and it should be listed as available to install
 
Old 02-10-2016, 10:12 PM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware FreeBSD Win10 MX
Posts: 9,658

Rep: Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085
Quote:
Originally Posted by John VV View Post
FIRST
Step #1
DO NOT use the root account !!!!!!!!!!!

you really DO NOT want to unzip a tar ball AS root
-- this is a very BAD IDEA
use your NORMAL user account
y u tripping over unzippng tar balls in root account? if it is an install program you have to be root to install it anyways no big deal..
 
Old 02-10-2016, 10:34 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,465

Rep: Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606Reputation: 2606
Quote:
anyways no big deal..
then go back to using XP and ONLY admin accounts

and see just HOW bad things can get

remember YOUR HISTORY the XP era was BAD -- plague or 1918 flu BAD!!!!

you extract a gzip as a normal user
( most tend to be source -- and you DO NOT build and run configure as root !!! )
you become root to run " make install"

or

if it is a binary with a install script
you become root to run it

you do not extract it as root

SECURITY 101 and BASIC COMMON SENSE !!!
 
Old 02-11-2016, 05:56 AM   #6
pantha_ashish
LQ Newbie
 
Registered: Feb 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks a lot for your valuable suggestion.
I am new in Linux system and currently I am trying to configure snort for network security.

I am doing configuration via snort's documentation but I am still confusion on snort rules package.

I could not find snort-rules package for centos 6 on their website.So,could you please suggest me more about how to download and install snortrules?

Sorry for English....

Quote:
Originally Posted by John VV View Post
FIRST
Step #1
DO NOT use the root account !!!!!!!!!!!

you really DO NOT want to unzip a tar ball AS root
-- this is a very BAD IDEA


use your NORMAL user account


second
#2
where did you get this "snortrules-snapshot-2962.tar.gz" from ?

the CURRENT on the snort site is 2980
https://www.snort.org/downloads


also snort should be in the cent repos
Code:
su -
yum search snort
and it should be listed as available to install
 
Old 02-11-2016, 08:06 AM   #7
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,769

Rep: Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052Reputation: 3052
Did you try the yum suggestion from John?
 
Old 02-11-2016, 09:22 AM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware FreeBSD Win10 MX
Posts: 9,658

Rep: Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085
Quote:
Originally Posted by John VV View Post
then go back to using XP and ONLY admin accounts and see just HOW bad things can get remember YOUR HISTORY the XP era was BAD -- plague or 1918 flu BAD!!!!

you extract a gzip as a normal user
( most tend to be source -- and you DO NOT build and run configure as root !!! )
you become root to run " make install"

or

if it is a binary with a install script
you become root to run it

you do not extract it as root

SECURITY 101 and BASIC COMMON SENSE !!!
it has nothing to do with common sense seeings that security with an operaing system is not common knowledge for one.

Two:
Apple and Oranges:
You are comparing windows which is nothing but one big security risk to Linux, where there are a conciderable lesser chance of infection and attack from outsided sources.

Windows has more people writing malware, and other software to attack it then Linux OS. Windows is in constant need of security updates because Microsoft never completes the systems they put out to the public to use, they just get them written good enough to run them then swamp the user with security updates to try and patch up all of the holes they left in the system before they put out another version of Windows just to keep up with projected earnings.

The installs final step needs root to install it, therefore user and permissions are set by root, which sets the owner to root, and whatever permissions the person that wrote it has it set them too. by the person that is installing the software ok mearly by that person using sudo make install.

the end product is what has the root attached to it. it does not matter if it is extraced and configured, make, make install all done as root or not.

the only effect is that it is root that is the only one that can delete the left overs being the source code and the directory it is in when finished with it.

just because one was in root when they did all of this does not add special permissions on whatever is installed so that someone out there can sneek in using a connetion to your PC to get in. or by a backdoor that they can physical get in using this backdoor. either way via cat5 or hands on actually.

That would be written inside of the code itself, therefore even if you ./configure and make as a user then sudo make install after it has been completed into a binary you still THEN give that person that wrote it permissions to get in, only becuse they wrote it into the source code prior to you or someone else compiling it and installing it on to there PC.

so now you will have to learn how to read source code in whatever language it was written in so that you can find whatever they put in there that sould not be so you can remove it first before using user to configue, make then going root to install the software.

it is inside of the software code not the procedures in how to install it.

that is not even common sense

read this:
HTG Explains: Why Windows Has the Most Viruses

Last edited by BW-userx; 02-11-2016 at 09:56 AM.
 
Old 02-11-2016, 09:59 AM   #9
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,622

Rep: Reputation: 4369Reputation: 4369Reputation: 4369Reputation: 4369Reputation: 4369Reputation: 4369Reputation: 4369Reputation: 4369Reputation: 4369Reputation: 4369Reputation: 4369
I think you misunderstood that post: common sense means: do not use root account (at all), only when it is really required. That means installing and/or configuring the os. Otherwise use regular user accounts and/or special user accounts with special rights (that is valid for databases, web servers ...). And again do not use root account at all!
That includes make, unzip and all the other usual commands as well.
 
Old 02-11-2016, 10:31 AM   #10
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware FreeBSD Win10 MX
Posts: 9,658

Rep: Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085
Quote:
Originally Posted by pan64 View Post
I think you misunderstood that post: common sense means: do not use root account (at all), only when it is really required.
That is a contradicting statment. in other words you are contradicting yourself.

Quote:
That means installing and/or configuring the os.
you have to be root to configure the OS it has to have root permissions to configure it on the system side. therefore invaildating your first statement. "do not use root account (at all), only when it is really required" even you know you have to use root.you are being ridged about it. This only causes mental stress that leads to maladaptive behavior and thoughts, that you're now experining as a result of it. ie. contradicting yourself

Quote:
Otherwise use regular user accounts and/or special user accounts with special rights (that is valid for databases, web servers ...). And again do not use root account at all!

this is all assigened by who? ROOT. now you said never use root, only when?

Two: you are now mixing apples with oranges again. I am nor was this post comment about anything other then extracting tar balls and installing software from source code. Period!



nope
Quote:

That includes make, unzip and all the other usual commands as well.
right there ... that last statement is your ridged thinking causing you to express maladaptive thoughts.

define usual commands as opposed to unusual commands. Please ...


I highy disagree about the no use of root account, if that where a scary truth that you are trying to present. Then Linux, and Unix would have never invented the root account so that it can be used.

the new crew have come up with a system that does not provide a root account on install. ie. Ubuntu and others. They have hidden this root account so that the common user that has no understanding of Linux or Unix in how to use it can not use dead hard root user account.

This is done to try and prevent the user from having problems due to them not knowing what they are doing while having root permissions at all times. this is why sudo came about, so that the root admin dude can assign permissions to other users that have no real idea what they are doing with limited root permissons so that the Admin root dude can at least shell out some of his duties to another.

Then their is that user that just hacks away at the keyboard under sudo with full root permissions can too just as well screw up the system as if he where in ROOT Period By the way that sudo is being used by these types of linux OS's.

it does not matter if you're in root or not, setting permissons on everything within the system is only limited by the user permission that he or she has.

if he is not a root user, then he cannot by any means set permissons on anything other then what he owns. therefore he cannot by any means whatsoever set up anything outside of his little domain.


Again your ridged thinking is causing you to have maladaptive thoughts causing you to no longer use logic instead you make statments such as this one that causes you to contradict yourself.

Quote:
Otherwise use regular user accounts and/or special user accounts with special rights (that is valid for databases, web servers ...). And again do not use root account at all!
When ever you are doing something in SUDO or SU or SU - you are using ROOT account.

you have to have root account to have permissions to set permissions on everything in the system.

you just are not given the root account even though it is still there in Ubuntu even.

even they that set up that linux system knows that if they remove root all together then they'd have no Unix based system. it would not be Linux.

your brain even knows it but you are fighting against it. That is why you are contradicting yourself. you are using your mind to fight against what your brains already knows to be the truth. ( or thinks is the truth, depending on the circumstances)

That you have to use root (account) that is where all of the permissions come from to use sudo, and su and su - .


stop your riged thinking before you end up leagally insane.

that is one way in how it starts.

Quote:
Originally Posted by pan64 View Post
I think you misunderstood that post: common sense means: do not use root account (at all), only when it is really required.
AS far as that statment goes it is he that misuded the term common sense. because he does not really know what common sense means or where it comes from.

Contradicting oneself as that statmeant does is not common sense.



if in ROOT account. install, set permissions, and owners to all that was modified as needed by using root permissions. That is what root user does. That is what it is for.

If a user does this then he or she has to become root in order to do that very same thing.

hence you are now contradicting yourself by saying never use root account. That is where the permissions to use sudo come from.

know your system.....



at lest the basics....

please....

by your and others ways of riged thinking to never use root account you and they should then use this Linux OS instead

Know your Linux!!!

Learn Linux | Root User, Sudo Users And Managing Users & User Groups


if you watch this you'll see that even He is in ROOT ACCOUNT as he shows the watcher what to do.

Last edited by BW-userx; 02-11-2016 at 12:13 PM.
 
Old 02-11-2016, 02:09 PM   #11
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,667

Rep: Reputation: 494Reputation: 494Reputation: 494Reputation: 494Reputation: 494
Quote:
root@dhcppc2 ~]# tar xvzf snortrules-snapshot-2962.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
[root@dhcppc2 ~]#
If the copy of the archive-file was not-defective the command would have extracted the archive. Download again and checksum before extracting.

Again, it is sound to be a $USER (not root) when extracting alien files. If root@host-# tar xvzf <alien-file> and the alien spaceship brought in some extraterrestrial virus, goodbye... but such invasion cannot happen easily when merely user@host-$ tar xvzf was in action. This is just an oldman's opinion. tar x as root if you want, that's a matter of taste and gallantry.

make install can only happen by root. make can $USER do. But $USER--$ ./robby.erik.SlackBuild <Enter> failed me in some alien applications building, I did not care to search my failure, I simply shelled it as root, done.
 
Old 02-11-2016, 06:10 PM   #12
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware FreeBSD Win10 MX
Posts: 9,658

Rep: Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085
No one said it had to be done as Root, it point is it can be done.


and as well as most software one downloads as tar is safe to do all of it in root, Aliens SlackBuilds are done by Him personally, I do not think he be the one to infect his own work. I have installed many slackBuilds as root without any problems.

it goes along the same lines as being in Windows installing programs, it is either infected or it is not. It does not matter if you install it using there install as Admin or not to install the program. if it is infected then it will infect your system, regaurdless if you use $USER or not. These are facts. Not options.

I too have installed many SlackBuilds going back and forth using su in my user account.

it all equates to the same. if it is infected and you installed it oh well. Dosn't matter if you where in user account when you did it or not.

as someone stated if an alien spaceship brought in some extraterrestrial virus. knowing that it'd be a far fetech thing to have a virus within source code off most sights.

whenever anyone installs something it is a gamble.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] .tar.gz or .zip package installation problem baijuchaudhari Linux - Newbie 3 10-02-2012 11:55 PM
How to search for a pattern of a tar ball and pipe that name to tar to extract linux_newb Linux - General 2 02-27-2012 05:28 PM
How to extract and install from .tar.gz and .tar.bz2 wstay Linux - Newbie 4 11-08-2008 11:14 AM
problem in installing .tar.gz package in mandriva 2008 det0nat0r Linux - Desktop 4 07-25-2008 06:29 AM
tar and bzip extract from CD phenrichs Linux - Newbie 4 12-05-2007 06:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration