Skip to Content.
Sympa Menu

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

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

List archive

Chronological Thread  
  • From: "Daniel B" <address@concealed>
  • To: <address@concealed>
  • 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


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: 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/ 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'});
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,

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

Archive powered by MHonArc 2.6.19+.

Top of Page