You are not logged in.

#1 2009-08-29 19:24:33

manehi
Member
From: Oxford/Coventry England
Registered: 2008-07-21
Posts: 12
Website

[solved] findutils - problem with file permissions

Hey,

I tried running makepkg -c for an updated PKGBUILD of a package I maintain in the AUR (gretl), and it seemed fine but then hit:

==> Tidying install...
  -> Purging other files...
  -> Compressing man and info pages...
  -> Stripping debugging symbols from binaries and libraries...
  -> Removing libtool .la files...
  -> Removing empty directories...
find: invalid predicate `-delete'

I'd had some other strange errors with find over the past few weeks or so (my last -Syu was after this month's catalyst driver came out with support for the current kernel) but had shrugged them off. This error made me decide to try reinstalling findutils, and it gave the error:

error: cannot remove file 'usr/bin/find': Operation not permitted

a bit stupidly, I tried pacman -Rd then -S findutils, and now I get

error: failed to commit transaction (conflicting files)
findutils: /usr/bin/find exists in filesystem
Errors occurred, no packages were upgraded.
missing dependency for ca-certificates : findutils
missing dependency for initscripts : findutils
missing dependency for mkinitcpio : findutils
missing dependency for texinfo : findutils

ls -als /usr/bin | grep find     gives:

   12 -rwxr-xr-x   1 root     root        10636 Mar 25 16:24 deepfind
   64 -rwxr-xr-x   1 root     root        59200 May  9 01:58 efinder
   64 -rwxr-xr-x   1 500      500         59536 Jun 16 14:49 find
...

and rm, mv, chmod, chown etc on /usr/bin/find as root, and from livecd, all also come back with "Operation not permitted".

find seems to work fine for a few simple uses I've just tried.. but the last time I ran makepkg -c without the error was before the last system upgrade, so I'm guessing find didn't upgrade properly then due to whatever is wrong with the permissions, leading to the other errors.

Anyway, I guess the question is, can I do anything to get rid of /usr/bin/find and reinstall findutils? don't mind so much about missing dependencies as I tend not to upgrade that often, but find not doing what it should is a bit of a pain.

Last edited by manehi (2009-08-30 08:52:20)

Offline

#2 2009-08-29 19:54:17

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: [solved] findutils - problem with file permissions

manehi wrote:

and rm, mv, chmod, chown etc on /usr/bin/find as root, and from livecd, all also come back with "Operation not permitted".

How could that be? Root is god! Or at least should have cosmic godly powers. Are you sure your disk is mounted r/w? Can you touch/rm any other file inside /usr/bin? Anywhere on the disk? Have you tried "fsck -f" on the disk?

Offline

#3 2009-08-29 20:52:36

manehi
Member
From: Oxford/Coventry England
Registered: 2008-07-21
Posts: 12
Website

Re: [solved] findutils - problem with file permissions

[root@v0 ~]# touch /usr/bin/warglewargle
[root@v0 ~]# rm /usr/bin/warglewargle  
[root@v0 ~]# mount
/dev/sda3 on / type ext3 (rw,noatime)
...

will boot into something else and run fsck now..

Offline

#4 2009-08-29 21:06:44

manehi
Member
From: Oxford/Coventry England
Registered: 2008-07-21
Posts: 12
Website

Re: [solved] findutils - problem with file permissions

fsck -f does its thing and doesn't complain..

Offline

#5 2009-08-29 23:27:30

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: [solved] findutils - problem with file permissions

If "rm -f find" isn't working, then the issue is probably with the permissions on /usr/bin. But if you're really attempting this as root, while booted from a cd, and the drive in question is then mounted r/w, then I really can't imagine how it could fail, unless there's some filesystem corruption. Even if /usr/bin were owned by someone other than root, and had permissions 000, root will still be able to rm /usr/bin/find.

So, if you've tried all this and are still having no success, I'm stumped.

Offline

#6 2009-08-30 00:25:16

manehi
Member
From: Oxford/Coventry England
Registered: 2008-07-21
Posts: 12
Website

Re: [solved] findutils - problem with file permissions

mm I tried all that, and no luck. though trying adduser 500 did give me a helpful reminder that usernames can't start with numbers...

anyway, it's not a huge deal atm, and I can always clean reinstall the / partition if things really break. Thanks all the same.

PS:
huh, just had a thought - I remember how I used to get annoyed how mounting partitions using ext2ifs in windows didn't respect permissions properly. and now I almost wish I had a windows partition / that this wasn't a laptop hard drive...

Last edited by manehi (2009-08-30 00:31:13)

Offline

#7 2009-08-30 00:33:28

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: [solved] findutils - problem with file permissions

Offline

#8 2009-08-30 08:51:41

manehi
Member
From: Oxford/Coventry England
Registered: 2008-07-21
Posts: 12
Website

Re: [solved] findutils - problem with file permissions

Thanks! That did the trick - lsattr find came up with a whole host of attributes set, and removing "a" and "i" was enough to get let me mv the pesky thing. Reinstalled findutils and everything is working fine. Thanks again

Offline

Board footer

Powered by FluxBB