You have right, chown made one error, because I received this communicate:
Right now I set up the object of Logfile::Rotate like this:error: chown failed: (sniffer.log.1) at test.pl line 150
my $log = new Logfile::Rotate( File => 'sniffer.log', + Pre => sub{close($LOG_ +FILE);}, +Post => sub{open( $LOG_FILE, '>', 'sniffer.log');}, + Flock => 'no', + Persist => 'no');
The problem with chown call was solved but unfortunately I have another error:
error: could not truncate sniffer.log: Permission denied at test.pl line 151
I think that this is related to this files wrong ownership:
-rw-r--r-- 1 root root 0 2012-01-04 20:51 sniffer.log -rw-r--r-- 1 200 200 0 2012-01-04 20:51 sniffer.log.1
I tried the same algorithm without packet capture and everything was ok: no errors, files were created with correct ownership
In reply to Re^2: Wrong ownership of the file
by ice_ice_ice
in thread Wrong ownership of the file
by ice_ice_ice
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |