SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Wow! Sorry, but I'm going to hijack this thread just for a second. What if umask is 0022 for both root and the normal user?
What does this mean?
I'm not sure I understand the question. Are you asking: "What does this (the original poster's problem) mean if the umask is left as the default (0022)?" ?
I'll work off the assumption that this is indeed your question, but first, let's clarify what's going on if umask is something else. Basically, the umask(2) setting determines which permissions should be *removed* from newly created files and directories. For a directory, the possible permissions are 7777, so a umask of 0022 when creating a new directory would result in the permissions of 0755 on the directory.
When umask is set to 0077, this will remove all group and user permissions from newly created files and directories; in essence,
Code:
7777 - 0077 = 0700
you get a directory that's only readable, writable, and cd into-able by its owner.
When makepkg(8) creates a package, it does so by bundling the contents of the directory in which it's run into a tarball, then compressing that tarball with gzip. If root's umask was 0077, then you might get a directory listing that looks something like this before packaging:
When makepkg(8) packages it up, those permissions are kept.
When installpkg(8) installs that package, guess what happens? ;-)
Anyway, if the umask(2) setting is not at fault, then either the app's Makefile sets incorrect permissions or the build script is doing something evil most likely. I doubt either of those is the case, but we'll see...
Last edited by rworkman; 10-26-2007 at 11:03 PM.
Reason: Um, actually answered the question...
First, you shouldn't have done a recursive chmod on the directories -- just a chmod on the directory itself was all you needed.
Second, just to verify - this: http://slackbuilds.org/repository/12.0/libraries/pygtk/ is what you were building, right? I've just done a test build on this, and I can't replicate your problem at all. Are you sure some other package couldn't have done it?
If you've got all of your custom packages saved somewhere, then try this (note that it's ugly code, but it should accomplish what we want here):
Code:
for i in *.tgz ; do
tar -tzvf $i | grep usr/$ | grep '---' ;
done
First, you shouldn't have done a recursive chmod on the directories -- just a chmod on the directory itself was all you needed.
Second, just to verify - this: http://slackbuilds.org/repository/12.0/libraries/pygtk/ is what you were building, right? I've just done a test build on this, and I can't replicate your problem at all. Are you sure some other package couldn't have done it?
If you've got all of your custom packages saved somewhere, then try this (note that it's ugly code, but it should accomplish what we want here):
Code:
for i in *.tgz ; do
tar -tzvf $i | grep usr/$ | grep '---' ;
done
I realize now it was foolish to do a chmod -R. Is there a way to work recursively on directories only?
The code didn't work for me. Anyways, I don't think it was another package since I lost access to /usr/bin and would have noticed this right away. I hadn't installed any package recently before that. I am looking at bash_history for clues...
I realize now it was foolish to do a chmod -R. Is there a way to work recursively on directories only?
Code:
find /usr -type d -exec chmod 0755 {} \;
However -- there may very well be directories underneath /usr that shouldn't have those permissions. This code is to simply serve as an example
Quote:
The code didn't work for me. Anyways, I don't think it was another package since I lost access to /usr/bin and would have noticed this right away. I hadn't installed any package recently before that. I am looking at bash_history for clues...
Look at the pygtk package manually to verify that it has incorrect permissions - I'm curious.
I ended up reinstalling Slack12... something that I wanted to do anyways since I "upgraded" from current at the time, and never really did a clean install.
rworkman:
It seems that the perms in pygtk ar good... I'm not sure what happened, but something similar happened after I re-installed when I compiled + installed jasper using a slackbuild...
???
This time, I fixed it properly only changing the dir i had too.
Please do the same verification on Jasper - if there is indeed a package with bad permissions when created from one of our build scripts, that's a *serious* bug that I want to fix immediately, if not sooner :-)
I've tested that jasper slackbuild from SBo quite a bit and haven't run across a permissions problem before. I would be interested in knowing what other programs you installed prior to jasper?
Please do the same verification on Jasper - if there is indeed a package with bad permissions when created from one of our build scripts, that's a *serious* bug that I want to fix immediately, if not sooner :-)
Sorry for the late reply.
The directories in my Jasper...Sbo.tgz package ended up with 700 perms:
usr
-bin
-doc
--jasper
-include
--jasper
-man
--man1
-lib
I've tested that jasper slackbuild from SBo quite a bit and haven't run across a permissions problem before. I would be interested in knowing what other programs you installed prior to jasper?
MagicMan
I don't remember exactly, but I needed Jasper for Digikam:
exiv2
libgphoto
libkdcraw
libexiv2
libkipi
sqlite
These were all compiled by myself and I used checkinstall.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.