6.0.0-git
2021-01-18

[#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 2012-01-13 (3293 days ago)
Due
Updated 2012-02-01 (3274 days ago)
Assigned
Resolved 2012-01-16 (3290 days ago)
Milestone 4.0.14
Patch Yes

History
2012-02-01 20:26:23 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
2012-01-30 18:11:25 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
2012-01-30 15:05:38 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
2012-01-20 07:50:45 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.
2012-01-18 10:24:35 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.
2012-01-18 10:23:07 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
2012-01-18 07:24:09 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.

2012-01-16 12:58:07 Jan Schneider Comment #3
Assigned to Jan Schneider
State ⇒ Resolved
Milestone ⇒ 4.0.14
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.
2012-01-16 12:57:58 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
2012-01-13 08:34:08 piper (at) hrz (dot) uni-marburg (dot) de Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ horde-set-perms not working
Due ⇒ 2012-01-13
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ Yes
New Attachment: horde-set-perms.patch Download
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