[bug #64900] Cannot search for files/folders with user/group id bigger than 2147483647

Jocelyn Le Sage <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <[email protected]>
URL:
  <https://savannah.gnu.org/bugs/?64900>

                 Summary: Cannot search for files/folders with user/group id
bigger than 2147483647
                   Group: findutils
               Submitter: jlesage
               Submitted: Thu 16 Nov 2023 01:49:03 PM UTC
                Category: find
                Severity: 3 - Normal
              Item Group: Wrong result
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 4.9.0
         Discussion Lock: Any
           Fixed Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Thu 16 Nov 2023 01:49:03 PM UTC By: Jocelyn Le Sage <jlesage>
The _find_ utility considers the numerical value of a user/group id as a
signed integer.  This is wrong since linux supports unsigned 32 bits numerical
IDs.

Thus, the maximum ID that can be provided to _find_ is 2147483647.  With an ID
higher than that, _find_ fails with the error *Result not representable*.  For
example:

# find /tmp -user 2147483647
# find /tmp -user 2147483648
find: 2147483648: Result not representable

Using higher ID is supported by Linux.  Here is another example illustrating
the problem.

# touch /tmp/test
# chown 3634365583:3634365583 /tmp/test
# ls -l /tmp/test
-rw-r--r-- 1 3634365583 3634365583 0 Nov 14 15:10 /tmp/test
# find /tmp -user 3634365583
find: 3634365583: Result not representable

I would expect _find_ to be able to handle an ID of _ 3634365583_.

Here is the version of _find_ I'm using:

find --version
find (GNU findutils) 4.9.0
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Eric B. Decker, James Youngman, and Kevin Dalley.
Features enabled: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS(FTS_CWDFD)
CBO(level=2)







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64900>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.