Bug 982503 - find -perm +mode(numeric) behavior is invalid and differs from /mode
Summary: find -perm +mode(numeric) behavior is invalid and differs from /mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: findutils
Version: 19
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-09 08:15 UTC by Darius Ivanauskas
Modified: 2013-07-16 01:31 UTC (History)
1 user (show)

Fixed In Version: findutils-4.5.11-2.fc19
Clone Of:
Environment:
Last Closed: 2013-07-16 01:31:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Darius Ivanauskas 2013-07-09 08:15:51 UTC
Description of problem:
After fedora upgrade f18->f19 -perm +mode has invalid behavior, while on f18 it was working ok. I know it is deprecated option, but anyway it shouldn't change it's behavior. It is better to remove it at all and make find return an error, but not make it work different way, in which case you could get some very bad unexpected result while using some scripts with this option - example OpenWrt build system.

Version-Release number of selected component (if applicable):
$ find --version
find (GNU findutils) 4.5.11


How reproducible:
100% just need to run find with specified option

Steps to Reproduce:
1. mkdir foo1; cd foo1; touch a_file; chmod 644 a_file;
touch b_file; chmod 444 b_file;
2. run command "find . -type -f -perm /0200"
3. and compare results with "find . -type -f -perm +0200"

Actual results:

$ find . -type f -perm /0200
./a_file

$ find . -type f -perm +0200

^^^^^^^^^^ no results

Expected results:
./a_file

Additional info:
On fedora 18 which has find version 4.5.10 this was working as expected.

Comment 1 Darius Ivanauskas 2013-07-09 08:27:49 UTC
See also: http://savannah.gnu.org/bugs/?38474

Comment 2 Kamil Dudka 2013-07-09 09:31:58 UTC
Thank you for reporting the bug.  There is an upstream fix available for this:

http://git.savannah.gnu.org/cgit/findutils.git/commit/?id=90f0c5d2
http://git.savannah.gnu.org/cgit/findutils.git/commit/?id=3d13be56

Comment 3 Kamil Dudka 2013-07-09 09:39:20 UTC
The current upstream behavior is to return an error if the old syntax is used:

> mkdir foo1; cd foo1; touch a_file; chmod 644 a_file; touch b_file; chmod 444 b_file
> find . -type f -perm /0200
./a_file
> find . -type f -perm +0200
find: invalid mode ‘+0200’
> echo $?
1

Comment 4 Kamil Dudka 2013-07-09 09:41:49 UTC
fixed in findutils-4.5.11-2.fc20

Comment 5 Fedora Update System 2013-07-09 09:54:23 UTC
findutils-4.5.11-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/findutils-4.5.11-2.fc19

Comment 6 Fedora Update System 2013-07-10 01:33:23 UTC
Package findutils-4.5.11-2.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing findutils-4.5.11-2.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-12691/findutils-4.5.11-2.fc19
then log in and leave karma (feedback).

Comment 7 Darius Ivanauskas 2013-07-10 06:42:44 UTC
Tested findutils-4.5.11-2.fc19 - it return error - so it is ok.

Comment 8 Kamil Dudka 2013-07-10 08:03:46 UTC
Great, thanks for testing it!

Comment 9 Fedora Update System 2013-07-16 01:31:41 UTC
findutils-4.5.11-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.