6.0.0-alpha14
7/1/25

[#10923] horde-set-perms not working
Summary horde-set-perms not working
Queue Horde Base
Queue Version 4.0.13
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester piper (at) hrz (dot) uni-marburg (dot) de
Created 01/13/2012 (4918 days ago)
Due
Updated 02/01/2012 (4899 days ago)
Assigned
Resolved 01/16/2012 (4915 days ago)
Github Issue Link
Github Pull Request
Milestone 4.0.14
Patch Yes

History
02/01/2012 08:26:23 PM Git Commit Comment #10 Reply to this comment
Changes have been made in Git (refs/heads/ajax_to_core):

commit 8ee55fca30cb7ba88bf6a9dbdb8db20b3334d9dc
Author: Jan Schneider <jan@horde.org>
Date:   Mon Jan 30 16:04:14 2012 +0100

     Fix completely (Bug #10923).

  horde/bin/horde-set-perms |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)

http://git.horde.org/horde-git/-/commit/8ee55fca30cb7ba88bf6a9dbdb8db20b3334d9dc
01/30/2012 06:11:25 PM Git Commit Comment #9 Reply to this comment
Changes have been made in Git (refs/heads/develop):

commit 8ee55fca30cb7ba88bf6a9dbdb8db20b3334d9dc
Author: Jan Schneider <jan@horde.org>
Date:   Mon Jan 30 16:04:14 2012 +0100

     Fix completely (Bug #10923).

  horde/bin/horde-set-perms |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)

http://git.horde.org/horde-git/-/commit/8ee55fca30cb7ba88bf6a9dbdb8db20b3334d9dc
01/30/2012 03:05:38 PM Git Commit Comment #8 Reply to this comment
Changes have been made in Git (refs/heads/master):

commit 8ee55fca30cb7ba88bf6a9dbdb8db20b3334d9dc
Author: Jan Schneider <jan@horde.org>
Date:   Mon Jan 30 16:04:14 2012 +0100

     Fix completely (Bug #10923).

  horde/bin/horde-set-perms |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)

http://git.horde.org/horde-git/-/commit/8ee55fca30cb7ba88bf6a9dbdb8db20b3334d9dc
01/20/2012 07:50:45 AM piper (at) hrz (dot) uni-marburg (dot) de Comment #7
New Attachment: horde-set-perms-1.patch Download
Reply to this comment
There is something wrong with your PHP then. 
RecursiveIteratorIterator::SELF_FIRST only changes the order of the 
iterator elements. It doesn't change whether directories are 
included or not.
PHP-documentation states that the default mode is 
RecursiveIteratorIterator::LEAVES_ONLY, which returns only files 
including 'path/..' and sometimes 'path/.' for my setup. Due to the 
'!$it->isDot()'-restriction, the dot-entries are skipped, so no 
directories are changed. Changing the restriction to 'if 
($val->getFilename() != '..' )', gets most of the directories and 
leaves 'HORDE_BASE/..' unchanged, but 
RecursiveIteratorIterator::SELF_FIRST still is necessary for those 
directories not returned as 'path/.'
I include a patch to your last version with these changes here.
01/18/2012 10:24:35 AM Jan Schneider Comment #6 Reply to this comment
I left out the explicit setting of HORDE_BASE, because the iterator
already includes it. The RecursiveIteratorIterator::SELF_FIRST flag
wasn't necessary either.
Without the RecursiveIteratorIterator::SELF_FIRST flag only files 
are changed, all directories are completely ignored in my 
test-setup. And even with this flag set, the HORDE_BASE directory is 
not changed, therefore I set it explicitely.
There is something wrong with your PHP then. 
RecursiveIteratorIterator::SELF_FIRST only changes the order of the 
iterator elements. It doesn't change whether directories are included 
or not.
01/18/2012 10:23:07 AM Git Commit Comment #5 Reply to this comment
Changes have been made in Git for this ticket:

Remove quotes (Bug #10923).

  1 files changed, 1 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/c704e141e6326a7916d0fa528580c82f3d9c3924
01/18/2012 07:24:09 AM piper (at) hrz (dot) uni-marburg (dot) de Comment #4 Reply to this comment
the single quotes in line 48
$grouppars = posix_getgrnam('$group');
have to be left out for being able to resolve the variable.
I left out the explicit setting of HORDE_BASE, because the iterator 
already includes it. The RecursiveIteratorIterator::SELF_FIRST flag 
wasn't necessary either.
Without the RecursiveIteratorIterator::SELF_FIRST flag only files are 
changed, all directories are completely ignored in my test-setup. And 
even with this flag set, the HORDE_BASE directory is not changed, 
therefore I set it explicitely.

01/16/2012 12:58:07 PM Jan Schneider Comment #3
Milestone ⇒ 4.0.14
State ⇒ Resolved
Assigned to Jan Schneider
Reply to this comment
The script 'horde-set-perms', which should set permissions for the 
installed horde-tree, is not working, because it compares group- and 
owner-names to numerical group- and owner-ids as returned by php, 
and is not handling directories. Please find attached a patch for 
these problems.
I left out the explicit setting of HORDE_BASE, because the iterator 
already includes it. The RecursiveIteratorIterator::SELF_FIRST flag 
wasn't necessary either.
01/16/2012 12:57:58 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git for this ticket:

[jan] Fix horde-set-perms (piper@hrz.uni-marburg.de, Bug #10923).

  3 files changed, 11 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/8c9fe1942e25b0f7af71ac873c119a4ef65718f6
01/13/2012 08:34:08 AM piper (at) hrz (dot) uni-marburg (dot) de Comment #1
Patch ⇒ Yes
State ⇒ Unconfirmed
New Attachment: horde-set-perms.patch Download
Milestone ⇒
Queue ⇒ Horde Base
Due ⇒ 01/13/2012
Summary ⇒ horde-set-perms not working
Type ⇒ Bug
Priority ⇒ 2. Medium
Reply to this comment
The script 'horde-set-perms', which should set permissions for the 
installed horde-tree, is not working, because it compares group- and 
owner-names to numerical group- and owner-ids as returned by php, and 
is not handling directories. Please find attached a patch for these 
problems.

Saved Queries