We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If you create a file with user permissions but then run logger under root the file rotate will not preserve these permissions causing access issues.
% ls -al log.log -rw-r--r-- 1 reginaldsmith staff 0 23 Sep 11:17 log.log % rvmsudo irb 2.7.2 :001 > require "logger" => true 2.7.2 :004 > puts File.stat("log.log").uid 502 => nil 2.7.2 :005 > log = File.open("log.log", "a") => #<File:log.log> 2.7.2 :006 > logger = Logger.new(log, "everytime") => #<Logger:0x00007fd7cfbc5ee0 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x00007fd7cfbc5eb8 @datetime_format=nil>, @formatte... 2.7.2 :007 > logger.info "hello" => true 2.7.2 :008 > puts File.stat("log.log").uid 0 2.7.2 :010 > exit % ls -al log.log -rw-r--r-- 1 root staff 123 23 Sep 11:20 log.log % irb 2.7.2 :001 > require "logger" => true 2.7.2 :002 > log = File.open("log.log", "a") Errno::EACCES (Permission denied @ rb_sysopen - log.log) >
The text was updated successfully, but these errors were encountered:
Peeking at the code, perhaps this is where we have the information about the old file and are creating a new one:
logger/lib/logger/log_device.rb
Line 201 in c601ed0
(Perhaps there are more places, but this is a start, at least.)
Sorry, something went wrong.
No branches or pull requests
If you create a file with user permissions but then run logger under root the file rotate will not preserve these permissions causing access issues.
The text was updated successfully, but these errors were encountered: