Bug #1725

Please modify fo-postinstall to check and correct ownership & permissions in the repo directories

Added by Mary Laser about 1 year ago. Updated about 1 month ago.

Status:New Start date:04/03/2012
Priority:Normal Due date:
Assignee:Mary Laser % Done:

0%

Category:Build/install/config
Target version:2.3.0
Rank:2 Tester:

Description

1) fo-postinstall should check an existing repo directories ownership & permissions
2) If they are wrong, issue a warning message.
3) the warning should instruct the user to re-run fo-postinstall with a "force" option to change an existing repo's ownership/permissions, if they are incorrect."
4) fo-postinstall does not currently have a "force" option; it will need to be added.

to test this,
1) manually change the repo directory (/srv/fossology/repository/) ownership and/or permissions to incorrect values and run fo-postinstall. you should see a warning.

2) run fo-postinstall again with the "force" option and verify that ownership and permissions are now correct.

History

Updated by Bob Gobeille about 1 year ago

Why is this relevant? What package did 4Privet need that it didn't have?
On IRC when I made the comment about not having postgresql-client, I was trying to debug an issue and thought 4Privet was the DB server. I needed client utilities (psql) to debug. However, 4Privet wasn't the server (as you pointed out on IRC) and it isn't where I needed to debug.

Updated by Mary Laser about 1 year ago

  • Assignee changed from Bob Gobeille to Mary Laser
  • Target version changed from 2.0.0 to 2.0.1

The missing postgresql-client apparently is not an issue. However, this script should be checked for accuracy anyway. In particular, please verify it checks and corrects permissions on the repo directories.

Updated by Paul Holland 12 months ago

  • IterNum set to 2

Updated by Mary Laser 12 months ago

  • Status changed from New to Feedback
  • Assignee changed from Mary Laser to Bob Gobeille

The following code (from fo-postinstall) shows the repo directory gets created (if it doesn't exist) with fossy:fossy and 2770. If the directory already exists, nothing is done. Do you think it's necessary to insure ownership & permissions are correct for existing repos?

if [ ! -d "$REPO" ] ; then
mkdir -p "$REPO"
chown {$PROJECTUSER}:{$PROJECTGROUP} $REPO
chmod 2770 $REPO # make sure the parent dir has the right permissions too
chown {$PROJECTUSER}:{$PROJECTGROUP} $\{REPO%/*\}
chmod 2770 $\{REPO%/*\}
else
echo "NOTE: Repository already exists at $REPO"
fi

Updated by Mary Laser 12 months ago

  • Status changed from Feedback to New
  • Assignee changed from Bob Gobeille to Alex Norton

I chatted with Bob about this. He suggests (and I agree) that fo-postinstall should check an existing repo directories ownership & permissions and issue a warning message if they are wrong. ALSO, the warning should instruct the user to re-run fo-postinstall with a "force" option to change an existing repo's ownership/permissions, if they are incorrect.

reassigning to Alex.

Updated by Paul Holland 9 months ago

  • Assignee changed from Alex Norton to Mary Laser
  • Priority changed from Normal to High
  • Rank set to 2
  • IterNum changed from 2 to 7

Updating to a high defect and setting iteration 7 to be addressed. Reassigning to Mary to validate if this has already been fixed.

Updated by Mary Laser 9 months ago

  • Estimate set to 1

set estimate to 1

Updated by Mary Laser 9 months ago

  • Subject changed from Please verify fo-postinstall is working correctly on both single & cluster installs to Please modify fo-postinstall to check and correct ownership & permissions in the repo directories
  • Description updated (diff)
  • Priority changed from High to Normal
  • Target version changed from 2.0.1 to 2.1.0
  • IterNum deleted (7)

The original title & description for this issue was wrong (see note #2). The real issue is described in note #5:

"I chatted with Bob about this. He suggests (and I agree) that fo-postinstall should check an existing repo directories ownership & permissions and issue a warning message if they are wrong. ALSO, the warning should instruct the user to re-run fo-postinstall with a "force" option to change an existing repo's ownership/permissions, if they are incorrect."

I am changing the priority to normal and removing from iteration 7. This issue should be re-evaluated for inclusion in 2.1.0

Updated by Bob Gobeille 8 months ago

  • Target version changed from 2.1.0 to 2.2.0

Updated by Mary Laser 5 months ago

what is the status?

Updated by larry shi 4 months ago

Mary Laser wrote:

what is the status?

I think there is no update.

Updated by Bob Gobeille about 1 month ago

  • Target version changed from 2.2.0 to 2.3.0

Also available in: Atom PDF