PacketFence
Bug Tracking System

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001038 [PacketFence] packaging minor sometimes 2010-07-27 10:44 2010-07-27 10:44
Reporter obilodeau View Status public  
Assigned To obilodeau
Priority normal Resolution open  
Status assigned   Product Version
Summary 0001038: Permission changing in installer.pl
Description 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`;
}
Additional Information
Tags No tags attached.
mtn revision
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2010-07-27 10:44 obilodeau New Issue
2010-07-27 10:44 obilodeau Status new => assigned
2010-07-27 10:44 obilodeau Assigned To => obilodeau


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker