Accéder au contenu.
Menu Sympa

fr - [sympa-fr] Can't give ownership of file /home/sympa/spool/tmp/*.stderr to sympa:sympa

Objet : Pour les administrateurs de serveurs de listes utilisant le logiciel Sympa

Archives de la liste

Chronologique Discussions  
  • From: "Daniel B" <adresse@cachée>
  • To: <adresse@cachée>
  • Subject: [sympa-fr] Can't give ownership of file /home/sympa/spool/tmp/*.stderr to sympa:sympa
  • Date: Sun, 26 Aug 2012 00:39:43 +0200

Hello.

Trying to install sympa on CentOS 6, I came across an error in the /var/log/messages log file which said the followings when starting sympa:

task_manager.pl: err tools::set_file_rights() Can't give ownership of file /home/sympa/spool/tmp/12033.stderr to sympa.sympa: Operation not permitted.

After a little seach, I thought that probably the file is created with a different ownership which is then not able to change the ownership anymore once the file is created.
I made a little workaround to solve the problem, by putting first the whole permissions to the file, and once the user and group is set, then restricting it. Regarding the security it should not be too much of a problem as it is done right after the file creation but you probably have a better way to solve the problem.
Here is the code to replace in the sympa/bin/tools.pm file, line 2662 in sympa V6.1.14:

## Error output is stored in a file with PID-based name
## Usefull if process crashes
unless($options->{'stderr_to_tty'}) {
open(STDERR, '>>', $Conf::Conf{'tmpdir'}.'/'.$pid.'.stderr', 0777) unless($main::options{'foreground'});
unless(&tools::set_file_rights(
file => $Conf::Conf{'tmpdir'}.'/'.$pid.'.stderr',
user => Sympa::Constants::USER,
group => Sympa::Constants::GROUP,
)) {
&do_log('err','Unable to set rights on %s', $Conf::Conf{'db_name'});
return undef;
}
chmod 0755, $Conf::Conf{'tmpdir'}.'/'.$pid.'.stderr';
}

I just wanted to share you this problem and ask for a final fix. I don't know how much sympa is affected by this error, but it is better to avoid having errors in the logs. Maybe there is another thing to do to solve the problem?

Best regards,
Daniel




  • [sympa-fr] Can't give ownership of file /home/sympa/spool/tmp/*.stderr to sympa:sympa, Daniel B, 25/08/2012

Archives gérées par MHonArc 2.6.19+.

Haut de le page