[NTLUG:Discuss] screwed up rights!
Chris Cox
cjcox at acm.org
Mon Jul 1 21:55:17 CDT 2002
Richard Geoffrion wrote:
> Slackware 8.1 w/reiserfs (No Xwindows/KDE/or Gnome)
> ------------------------------------------------------------------------
>
> I just did an ls -l in the /usr/src directory of a new server I'm building
> and I have to say that I have NO idea why the rights in this directory are
> so screwed up. Check this out.
>
> ['ls -l /usr/src']
> drwxr-xr-x 5 2222 2222 784 Jun 27 17:36 Net_SSLeay.pm-1.17/
> drwxr-xr-x 2 root root 224 Jun 28 00:43 autorespond-2.0.2/
> drwxrwxrwx 23 richard users 2792 Jul 1 13:26 courier-imap-1.5.1/
> drwxr-xr-x 5 root bin 19160 Jun 28 13:40 ezmlm-0.53/
...rest snipped...
> Who the heck is user and group 2222! It's not in my /etc/passwd file!
>
> All of these source code directories were extracted using the command
> 'tar -zxvf /usr/download/example.gz'
>
> Does THAT have anything to do with it? How SHOULD I be extracting files?
> Do I need to do anything to fix the current rights? (chown -R root:root
> /usr/src; chown -R richard:users /usr/src/courier-imap-1.5.1)
Two likely causes...
1. The most likely cause, the packages were copied/unpackaged as root, root
will preserve the permission bits, including the uid/gid of the package
being unarchived (untar'd).
2. Sometimes you'll see this when you delete a user... since the user
no longer exists on the system, the system can only show the uid number
for the files previously associated with the deleted username.
In general, it's not a huge problem. You can either unpackage things
as your normal id (richard)... or you can change the permissions after
unpackaging things with a recursive chown... either way is probably
fine. Shoot, I'll admit, I usually don't fix it at all.... however,
it can lead to certain security issues.
More information about the Discuss
mailing list