Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Finder] Issues with the x permission not set on sub-folder #6981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vicb opened this issue Feb 6, 2013 · 9 comments
Closed

[Finder] Issues with the x permission not set on sub-folder #6981

vicb opened this issue Feb 6, 2013 · 9 comments

Comments

@vicb
Copy link
Contributor

vicb commented Feb 6, 2013

When a sub-folder does not have the x bit set:

  • the PhpAdapter throws an UnexpectedValueException, quite misleading,
  • the native finders only display on error on stderr (no exception).

I have discussed with @fabpot about this issue, the best would be to have a method to ignore such folders (the flag would be off by default, ie legacy behavior)

/cc @jfsimon would you have some bw to look at this ?

@jfsimon
Copy link
Contributor

jfsimon commented Feb 6, 2013

@vicb yep, i'll have time next week to implement that.

@vicb
Copy link
Contributor Author

vicb commented Feb 6, 2013

Thanks !

@vicb
Copy link
Contributor Author

vicb commented Feb 6, 2013

Some more notes:

  • The PhpAdapter fix should go in 2.0 (not really an adapter back then),
  • The native fixes should go in the release were they were introduced (2.2 IIRC),
  • The new flag should go in 2.3.

@jfsimon
Copy link
Contributor

jfsimon commented Feb 12, 2013

@vicb tell me if I understand you well:

  • a flag (let say ignoreNonPermittedDirectories) must be added
  • if flag is false, current behavior is unchanged
  • if flag is true, non openable folders are ignored by search

On native finders, should an exception be thrown if flag is false and an non openable folder is encountered?

@vicb
Copy link
Contributor Author

vicb commented Feb 12, 2013

I would introduce:

  • a PermissionException, thrown by all the finders,
  • a "ignorePermissionError" flag and fluid methods, default to false (ie current behavior)
  • when the flag is set to true non redable folders would be ignored.

fabpot added a commit that referenced this issue Mar 23, 2013
This PR was merged into the master branch.

Discussion
----------

[Finder] Adds AccessDeniedException

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6981

Commits
-------

714ace8 [finder] Introduced AccessDeniedException
@fabpot fabpot closed this as completed Mar 23, 2013
@vicb
Copy link
Contributor Author

vicb commented Mar 23, 2013

re-oprening as not solved (ony exceptions have been added)

@vicb vicb reopened this Mar 23, 2013
@jfsimon
Copy link
Contributor

jfsimon commented Mar 23, 2013

The ignoreAccessExceptions() method is missing.
@vicb Is this a good name?

@vicb
Copy link
Contributor Author

vicb commented Mar 23, 2013

I think that's a bad name. You are not ignoring the exception (ie the result) but the root cause (ie the permission error). I don't have good any names in mind ((skip|ignore)UnreadableFolders maybe)

fabpot added a commit that referenced this issue Apr 22, 2013
This PR was merged into the master branch.

Discussion
----------

[Finder] adds a way to ignore AccessDeniedException

This PR adds a `Finder::ignoreUnreadableDirs()` method which tells `Finder` to ignore unreadable directories instead of throwing an `AccessDeniedException`.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6981

Commits
-------

a63b30b [Finder] added Finder::ignoreUnreadableDirs() method
@fabpot
Copy link
Member

fabpot commented Jun 13, 2013

Closing as the remaining point was fixed in #7518

@fabpot fabpot closed this as completed Jun 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants