[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: problem running apt-get -b



Am 12. Jul, 2001 schwäzte Faheem Mitha so:

> Agreed, but I do... :-) I think the problem may be that the non-existent
> user owning the directory is confusing the permission system. Can't think

Don't matter to root. System doesn't look to see if the user exists ( guess
that could be added to pam, but AFAIK it hasn't been at this point ).

ugo = user group other

First char tells about the file. d is for directory, - means plain file.
There are a couple of other valid types.

The next three are for who owns the file, then group, then finally other.

if owner matches, then the first three are in effect.
elsif the user is in the same group as the file the second trilogy is in
effect.
else the third is in effect.

If the owner doesn't exist, then no one matches that part, but the owner
not existing is irrelevant.

Oh, BTW, there's another check. If you are UID 0, called root, then we skip
those little permission checks and just let you mangle things :).

I have seen, however, that removing all perms can also prevent root from
changing a file. Technically, that shouldn't happen.

> The output of find / -user 1000 (in total) is 
> 
> Chrestomanci:/# find / -user 1000
> /mnt/suse/home/faheem/debian/pgp4pine-1.75-6

OK, if this is where your home dir is, especially if it's listed
as /home/faheem in /etc/passwd, but /home/faheem shows up as
/mnt/suse/home/faheem due to the magic of soft links, then "usermod -u"
probably won't change perms in your home dir. In other words, it probably
ignores soft links.

Also, I presume you've checked, but that partition is mounted read/write not
read-only, right? rw instead of ro in mount output.

Try lsattr and check out any flags you find on anything :).

find . -exec lsattr {} \; | grep -v "^------------"

> drwxr-xr-x    4 1000     faheem       1024 Mar 26 00:36 .
> drwxr-xr-x    4 1000     faheem       1024 Jul 12 12:14 ..
> drwxr-xr-x    2 1000     faheem       1024 Mar 26 00:36 patches
> drwxr-xr-x    2 1000     faheem       1024 Mar 26 00:36 tarballs
> 
> so this entire directory has permissions 1000, for no apparent reason. Is

Ownership of 1000. Perms are 0755 :).

> there anywhere else I can ask? Would the maintainers of these tools have
> any idea?

How about moving pgp4pine-1.75-6 to pgp4pine-1.75-6.borken and starting from
scratch?

find / -user 1000 | chown faheem {} \;

When run as root, that will change ownership on rw mounts for files that
haven't been locked down with chattr.

Please be very, very careful with that. In other words make sure you know
what it does and that I haven't made any mistakes with it :).

ciao,

der.hans
-- 
# der.hans@LuftHans.com home.pages.de/~lufthans/ www.DevelopOnline.com
#  Like the maid, I don't do (M$)Windows. - der.hans



Reply to: