LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-27-2009, 10:28 AM   #1
lopid
Member
 
Registered: Jun 2008
Posts: 143

Rep: Reputation: Disabled
gzip/tar Bug In installpkg


When I use installpkg from the cmdline, my usual non-root account is suddenly 'disabled' - it no longer has access to the filesystem. I can't su to the user from root, it says something about not having permission to its home directory, and the X log is filled with messages about not having access to /proc/diskstats. The only recovery from this that I've found is a hard reboot.

I discovered that it's caused by the following line in /sbin/installpkg:

( cd $ROOT/ ; $packagecompression -dc | $TAR -xlUpvf - ) < $package >> $TMP/$shortname 2> /dev/null

I can reproduce by doing this, for example:

( gzip -dc | tar-1.13 -xlUpvf - ) < /usr/local/packages/faac-1.28-i486-pk.tgz

There is nothing wrong with /usr/local/packages/faac-1.28-i486-pk.tgz, BTW. My workaround is to use this format instead:

gzip -dc /usr/local/packages/faac-1.28-i486-pk.tgz | tar-1.13 -xlUpvf -

So that's

$packagecompression -dc $package | $TAR -xlUpvf - >> $TMP/$shortname 2> /dev/null

in /sbin/installpkg.

Last edited by lopid; 09-27-2009 at 10:35 AM.
 
Old 09-27-2009, 10:45 AM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,531

Rep: Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887
Did you configure the /bin/sh symlink to point to something else than bash? Did you configure root to use another login shell than bash?

Eric
 
Old 09-27-2009, 10:49 AM   #3
lopid
Member
 
Registered: Jun 2008
Posts: 143

Original Poster
Rep: Reputation: Disabled
No, /bin/sh is pointing to the /bin/bash executable, and root is using bash.

> l /bin/sh
lrwxrwxrwx 1 4 /bin/sh -> bash*
> l /bin/bash
-rwxr-xr-x 1 663K /bin/bash*
> echo $SHELL
/bin/bash
 
Old 09-27-2009, 04:47 PM   #4
ljb643
Member
 
Registered: Nov 2003
Posts: 411

Rep: Reputation: Disabled
I'll take a wild guess. Your package tar file has an entry that is changing owner/permission on your non-root user's home directory (possibly via ".") so that account no longer has access to its own home. (I will futher guess that your X messages about /proc/diskstats are a canard.)

Please do a full index of your package (tar -xvzf) to a file, and go over the file carefully, looking for any unexpected entries. It's a long shot, but worth checking.
 
Old 09-28-2009, 04:48 PM   #5
lopid
Member
 
Registered: Jun 2008
Posts: 143

Original Poster
Rep: Reputation: Disabled
Nope, it doesn't do anything with permissions anywhere, and the permissions on the home directory were OK when I looked with the root account, so I really don't know why it said I couldn't access stuff when the permissions were as they usually are - accessible.
 
Old 09-29-2009, 12:05 AM   #6
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,342

Rep: Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878
Show the output of "tar tvf" on the package in question.
 
Old 09-29-2009, 10:21 AM   #7
grissiom
Member
 
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 423

Rep: Reputation: 45
I wonder that if installpkg would change your home directory permission, it could be recovered from a hard reboot. IMHO, the directory permission remains on the file system even if you reboot. Please correct me if I made a mistake
 
Old 10-02-2009, 10:59 AM   #8
lopid
Member
 
Registered: Jun 2008
Posts: 143

Original Poster
Rep: Reputation: Disabled
I've just updated a different computer to 13 and I get the same symptom, so I had to use the same fix. It happens no matter the package. For example, the one referred to above was for faac on my home computer. It happened also on my work computer, this time I installed freetype:

> tar tvf /usr/local/packages/freetype-2.3.9-i486-pk.tgz
drwx------ root/root 0 2009-10-02 11:08 ./
drwxr-xr-x root/root 0 2009-10-02 11:08 usr/
drwxr-xr-x root/root 0 2009-10-02 11:08 usr/bin/
-rwxr-xr-x root/root 3712 2009-10-02 11:08 usr/bin/freetype-config
drwxr-xr-x root/root 0 2009-10-02 11:08 usr/lib/
-rwxr-xr-x root/root 947 2009-10-02 11:08 usr/lib/libfreetype.la
drwxr-xr-x root/root 0 2009-10-02 11:08 usr/lib/pkgconfig/
-rw-r--r-- root/root 292 2009-10-02 11:08 usr/lib/pkgconfig/freetype2.pc
-rwxr-xr-x root/root 468548 2009-10-02 11:08 usr/lib/libfreetype.so.6.3.20
-rw-r--r-- root/root 550798 2009-10-02 11:08 usr/lib/libfreetype.a
drwxr-xr-x root/root 0 2009-10-02 11:08 usr/share/
drwxr-xr-x root/root 0 2009-10-02 11:08 usr/share/aclocal/
-rw-r--r-- root/root 6295 2009-10-02 11:08 usr/share/aclocal/freetype2.m4
drwxr-xr-x root/root 0 2009-10-02 11:08 usr/include/
drwxr-xr-x root/root 0 2009-10-02 11:08 usr/include/freetype2/
drwxr-xr-x root/root 0 2009-10-02 11:08 usr/include/freetype2/freetype/
-rw-r--r-- root/root 3897 2009-10-02 11:08 usr/include/freetype2/freetype/ftsynth.h
-rw-r--r-- root/root 10403 2009-10-02 11:08 usr/include/freetype2/freetype/ftwinfnt.h
-rw-r--r-- root/root 20051 2009-10-02 11:08 usr/include/freetype2/freetype/t1tables.h
-rw-r--r-- root/root 39273 2009-10-02 11:08 usr/include/freetype2/freetype/ftglyph.h
-rw-r--r-- root/root 10140 2009-10-02 11:08 usr/include/freetype2/freetype/ftsystem.h
-rw-r--r-- root/root 7264 2009-10-02 11:08 usr/include/freetype2/freetype/ftchapters.h
-rw-r--r-- root/root 4487 2009-10-02 11:08 usr/include/freetype2/freetype/ftxf86.h
-rw-r--r-- root/root 34933 2009-10-02 11:08 usr/include/freetype2/freetype/fttypes.h
-rw-r--r-- root/root 2229 2009-10-02 11:08 usr/include/freetype2/freetype/ttunpat.h
-rw-r--r-- root/root 11249 2009-10-02 11:08 usr/include/freetype2/freetype/ftincrem.h
-rw-r--r-- root/root 10342 2009-10-02 11:08 usr/include/freetype2/freetype/ftadvanc.h
-rw-r--r-- root/root 12600 2009-10-02 11:08 usr/include/freetype2/freetype/ftgxval.h
-rw-r--r-- root/root 10017 2009-10-02 11:08 usr/include/freetype2/freetype/ftsnames.h
-rw-r--r-- root/root 60248 2009-10-02 11:08 usr/include/freetype2/freetype/ftcache.h
-rw-r--r-- root/root 7136 2009-10-02 11:08 usr/include/freetype2/freetype/ftotval.h
-rw-r--r-- root/root 19557 2009-10-02 11:08 usr/include/freetype2/freetype/ftstroke.h
-rw-r--r-- root/root 78243 2009-10-02 11:08 usr/include/freetype2/freetype/ftimage.h
-rw-r--r-- root/root 32501 2009-10-02 11:08 usr/include/freetype2/freetype/ftoutln.h
-rw-r--r-- root/root 6316 2009-10-02 11:08 usr/include/freetype2/freetype/ftlcdfil.h
drwxr-xr-x root/root 0 2009-10-02 11:08 usr/include/freetype2/freetype/config/
-rw-r--r-- root/root 7245 2009-10-02 11:08 usr/include/freetype2/freetype/config/ftstdlib.h
-rw-r--r-- root/root 24761 2009-10-02 11:08 usr/include/freetype2/freetype/config/ftheader.h
-rw-r--r-- root/root 43488 2009-10-02 11:08 usr/include/freetype2/freetype/config/ftoption.h
-rw-r--r-- root/root 1056 2009-10-02 11:08 usr/include/freetype2/freetype/config/ftmodule.h
-rw-r--r-- root/root 16269 2009-10-02 11:08 usr/include/freetype2/freetype/config/ftconfig.h
-rw-r--r-- root/root 22712 2009-10-02 11:08 usr/include/freetype2/freetype/ftmm.h
-rw-r--r-- root/root 11407 2009-10-02 11:08 usr/include/freetype2/freetype/ftrender.h
-rw-r--r-- root/root 13998 2009-10-02 11:08 usr/include/freetype2/freetype/ftbitmap.h
-rw-r--r-- root/root 6749 2009-10-02 11:08 usr/include/freetype2/freetype/ftbdf.h
-rw-r--r-- root/root 5579 2009-10-02 11:08 usr/include/freetype2/freetype/ftcid.h
-rw-r--r-- root/root 5002 2009-10-02 11:08 usr/include/freetype2/freetype/tttags.h
-rw-r--r-- root/root 39499 2009-10-02 11:08 usr/include/freetype2/freetype/tttables.h
-rw-r--r-- root/root 8443 2009-10-02 11:08 usr/include/freetype2/freetype/fttrigon.h
-rw-r--r-- root/root 17098 2009-10-02 11:08 usr/include/freetype2/freetype/ftmac.h
-rw-r--r-- root/root 4256 2009-10-02 11:08 usr/include/freetype2/freetype/ftlzw.h
-rw-r--r-- root/root 6289 2009-10-02 11:08 usr/include/freetype2/freetype/ftpfr.h
-rw-r--r-- root/root 11837 2009-10-02 11:08 usr/include/freetype2/freetype/fterrdef.h
-rw-r--r-- root/root 9456 2009-10-02 11:08 usr/include/freetype2/freetype/fterrors.h
-rw-r--r-- root/root 240126 2009-10-02 11:08 usr/include/freetype2/freetype/freetype.h
-rw-r--r-- root/root 23574 2009-10-02 11:08 usr/include/freetype2/freetype/ftmodapi.h
-rw-r--r-- root/root 7430 2009-10-02 11:08 usr/include/freetype2/freetype/ftmoderr.h
-rw-r--r-- root/root 9561 2009-10-02 11:08 usr/include/freetype2/freetype/ftsizes.h
-rw-r--r-- root/root 4621 2009-10-02 11:08 usr/include/freetype2/freetype/ftbbox.h
-rw-r--r-- root/root 4039 2009-10-02 11:08 usr/include/freetype2/freetype/ftgasp.h
-rw-r--r-- root/root 4288 2009-10-02 11:08 usr/include/freetype2/freetype/ftgzip.h
-rw-r--r-- root/root 16452 2009-10-02 11:08 usr/include/freetype2/freetype/ftlist.h
-rw-r--r-- root/root 62164 2009-10-02 11:08 usr/include/freetype2/freetype/ttnameid.h
-rw-r--r-- root/root 3890 2009-10-02 11:08 usr/include/ft2build.h
drwxr-xr-x root/root 0 2009-10-02 11:08 install/
-rw-r--r-- root/root 204 2009-10-02 11:08 install/doinst.sh
 
Old 10-02-2009, 11:14 AM   #9
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,342

Rep: Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878Reputation: 878
Quote:
Originally Posted by lopid View Post
I've just updated a different computer to 13 and I get the same symptom, so I had to use the same fix. It happens no matter the package. For example, the one referred to above was for faac on my home computer. It happened also on my work computer, this time I installed freetype:

> tar tvf /usr/local/packages/freetype-2.3.9-i486-pk.tgz
drwx------ root/root 0 2009-10-02 11:08 ./
I don't know what you're using to build your packages, but it's not setting the permissions of the toplevel / correctly. Note that / will be mode 0700 after installing that package, so root is the only user able to cd into or access the contents of subdirectory of /.

As expected, the problem is NOT in pkgtools. :-)

The reason a reboot fixes it is because of the following snippet from rc.M:
Code:
# Ensure basic filesystem permissions sanity.
chmod 755 / 2> /dev/null
chmod 1777 /tmp /var/tmp

Last edited by rworkman; 10-02-2009 at 11:16 AM.
 
Old 10-02-2009, 12:43 PM   #10
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,531

Rep: Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887Reputation: 5887
I do not know who this guy "pk" is but if all his packages are like freetype-2.3.9-i486-pk.tgz then I would not install any of his. They break your Slackware system for sure thanks to the restrictive permissions they set on your root directory.

Eric
 
Old 10-02-2009, 05:24 PM   #11
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,442

Rep: Reputation: 73
maybe "pk" just runs as root
 
Old 10-04-2009, 08:28 AM   #12
lopid
Member
 
Registered: Jun 2008
Posts: 143

Original Poster
Rep: Reputation: Disabled
Aha, I see! pk are my own packages I made with a simple script that I made, since checkinstall no longer seems to work with Slack 13. I'll correct that permission, thanks!
 
Old 10-04-2009, 10:00 AM   #13
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,897

Rep: Reputation: 577Reputation: 577Reputation: 577Reputation: 577Reputation: 577Reputation: 577
See my signature for a nice helper with those details...
 
  


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
Problem with installpkg - external compression utility gzip missing samkz Slackware 5 04-20-2009 12:48 AM
[BUG] Current pkgtools installpkg bug jazzor Slackware 7 04-16-2009 05:30 AM
Using Installpkg on a *.tar.gz file flowersrj Slackware - Installation 2 11-29-2006 07:04 AM
tar and gzip c0c0deuz Linux - General 2 10-31-2002 03:04 PM
dd, tar and gzip nabil Linux - General 3 01-18-2002 04:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:50 AM.

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