PacketFence - BTS - PacketFence
View Issue Details
0001038PacketFencepackagingpublic2010-07-27 10:442012-08-07 10:10
obilodeau 
obilodeau 
normalminorsometimes
closedfixed 
 
3.5.0 
0001038: Permission changing in installer.pl
Why isn't it done through the RPM?

Here's a typical problematic scenario:
MySQL db was installed somewhere in /usr/local/pf/. Running installer.pl chown all the files to pf:pf which makes mysqld sad.

Some mailing list conversation backing the change:

> Now i have seen, that the new installer.pl script 
> makes at the end (after the mysql database creation) a chown to the 
> installation directory.
> So it has changed my permission to the mysql database directory.

It's nothing new, as far as I could go in our source repo, it always worked like that.

> 
> Was it a bad idea to install the mysql database in the pf directory?

Yes and no, we know we like to keep stuff in /var/lib/mysql/ since it's the standard and others don't 
look around for the database in emergency situations.

But it should not prevent you of doing what you think is fine.

> 
> Or is it possible to change the installer script, that only the 
> installed files/dir are changed?
> - Another simple solution is to print a notification in the installation 
> process.
> - Or make a notice in the Documentation section for the HA when it was a 
> good idea to include the mysql database in the pf directory.
> 
Problem is I don't even know why we set everything to be owned by pf:pf in that script and we don't let 
the RPM take care of it instead..

Also, on upgrade, you don't need to run installer.pl. That's another thing that is unclear.


Some code to be rethought of:
# TODO: au démarrage de PF, créer les logs si les fichiers n'existent pas
# et supprimer cette section
print "Creating empty log files\n";
`touch $install_dir/logs/packetfence.log`;
`touch $install_dir/logs/snmptrapd.log`;
`touch $install_dir/logs/access_log`;
`touch $install_dir/logs/error_log`;
`touch $install_dir/logs/admin_access_log`;
`touch $install_dir/logs/admin_error_log`;
`touch $install_dir/logs/admin_debug_log`;
`touch $install_dir/logs/pfdetect`;
`touch $install_dir/logs/pfmon`;
`touch $install_dir/logs/pfredirect`;

print "Setting permissions\n";
print "  Chowning $install_dir pf:pf\n";
`chown -R pf:pf $install_dir`;
foreach my $file (@suids) {
    print "  Chowning $file root:root and setting SGID bits\n";
    `chown root:root $file`;
    `chmod 6755 $file`;
}
No tags attached.
related to 0001503closed  support installation from source 
child of 0001444closed  web-based configuration wizard 
Issue History
2010-07-27 10:44obilodeauNew Issue
2010-07-27 10:44obilodeauStatusnew => assigned
2010-07-27 10:44obilodeauAssigned To => obilodeau
2010-09-15 11:29obilodeauTarget Version1.9.1 => 1.9.2
2010-09-22 16:02obilodeauTarget Version1.9.2 => 1.9.3
2012-05-07 15:38obilodeauRelationship addedchild of 0001444
2012-08-03 09:56dwuelfrathNote Added: 0002862
2012-08-03 09:56dwuelfrathStatusassigned => closed
2012-08-03 09:56dwuelfrathResolutionopen => won't fix
2012-08-03 09:56dwuelfrathFixed in Version => 3.5.0
2012-08-03 09:56dwuelfrathTarget Version1.9.3 =>
2012-08-07 10:10obilodeauNote Added: 0002896
2012-08-07 10:10obilodeauResolutionwon't fix => fixed
2012-08-07 10:31obilodeauRelationship addedrelated to 0001503

Notes
(0002862)
dwuelfrath   
2012-08-03 09:56   
Since PacketFence 3.5.0, installer.pl and configurator.pl scripts have been removed. A new web based configurator has been introduced.

Feel free to reopen in any case.
(0002896)
obilodeau   
2012-08-07 10:10   
I'm considering the removal as a fix and not as an indication that it won't be fixed. I changed the resolution accordingly.

( IOW: don't mess with my developer stats! :P )