-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
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
mkdir permission error for log directory #7
Comments
in southwest-checkin/lib/autoluv.rb around line 29 (of probably an older version of src code I had laying around) it shows:
So, the log folder is created by autoluv, which you have no control over. But perhaps you DO have control over the permissions of the /var/lib/gems/2.7.0/gems/autoluv-0.3.1/ folder inside the container. Maybe the fix is to add this line to the Dockerfile:
|
@altodd you made mention of running as non-root user in this comment. #6 (comment) |
Thanks for making this issue! I had a flight over Thanksgiving that I didn’t get an email for and meant to look into it but hadn’t gotten back to it. I can do some digging this weekend. Feel free to open a pull request if you happen to figure something out before then. If you clone the other two repos and run your locally modified Docker file with your permissions change you should be able to get some logs if what you suggest is the case. I think I put some instructions in the readme, but I am currently on my laptop and don’t have my security key to log in and verify that (I didn’t grab it before sitting down and I have a cat on my lap, it’s illegal to disturb him).
… On Dec 6, 2023, at 8:29 PM, hildebrau ***@***.***> wrote:
@altodd <https://github.com/altodd> you made mention of running as non-root user in this comment. #6 (comment) <#6 (comment)>
Perhaps that is when this broke? Though, I feel like it worked since then.. so probably somewhat related; but then something else changed, likely.
—
Reply to this email directly, view it on GitHub <#7 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AFSEG56BXZ2AJCFJAKGKHNTYIELWHAVCNFSM6AAAAABAKHYQFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBTHE4DQMBTGI>.
You are receiving this because you were mentioned.
|
pull-request done.. man, I am terrible at github.. so my apologies if I screwed any of that up. I think I've done it twice now and I have to re-learn it all each time. Yes, your readme gave some hints on how to clone the required packages after cloning yours first.. I made my changes to the Dockerfile and tested via this:
Eventually it didn't throw an error and I received an email saying: |
Glad you got it figured out! Thanks for the pull request. |
Did anyone test this new version w/ a check in yet? I have a check in on 12/20 and would love to know it works again before then. ;) |
Maybe I did something wrong; but when I tried using the :latest of this project, I'm still getting an error.. 11: from /usr/local/bin/autoluv:23:in load' 10: from /var/lib/gems/2.7.0/gems/autoluv-0.3.1/bin/autoluv:12:in <top (required)>'9: from /var/lib/gems/2.7.0/gems/autoluv-0.3.1/bin/autoluv:26:in rescue in <top (required)>' 8: from /var/lib/gems/2.7.0/gems/autoluv-0.3.1/lib/autoluv.rb:46:in notify_user'7: from /var/lib/gems/2.7.0/gems/autoluv-0.3.1/lib/autoluv.rb:29:in log' 6: from /usr/lib/ruby/2.7.0/fileutils.rb:211:in mkdir_p'5: from /usr/lib/ruby/2.7.0/fileutils.rb:211:in each' 4: from /usr/lib/ruby/2.7.0/fileutils.rb:226:in block in mkdir_p'3: from /usr/lib/ruby/2.7.0/fileutils.rb:226:in reverse_each' 2: from /usr/lib/ruby/2.7.0/fileutils.rb:228:in block (2 levels) in mkdir_p'1: from /usr/lib/ruby/2.7.0/fileutils.rb:250:in fu_mkdir' /usr/lib/ruby/2.7.0/fileutils.rb:250:in mkdir': Permission denied @ dir_s_mkdir - /var/lib/gems/2.7.0/gems/autoluv-0.3.1/logs (Errno::EACCES)
|
I need to manually push a new build, the code/file has been updated but I haven’t actually logged in and pushed yet. If you use the one built with your change that should be the same, or will try to make an update to the docker repo soon. Thanks,Aaron ToddOn Dec 13, 2023, at 2:46 PM, hildebrau ***@***.***> wrote:
@altodd
Maybe I did something wrong; but when I tried using the :latest of this project, I'm still getting an error..
/var/lib/gems/2.7.0/gems/rest-client-2.1.0/lib/restclient/abstract_response.rb:249:in exception_with_response': 400 Bad Request (RestClient::BadRequest) 12: from /usr/local/bin/autoluv:23:in '
11: from /usr/local/bin/autoluv:23:in load' 10: from /var/lib/gems/2.7.0/gems/autoluv-0.3.1/bin/autoluv:12:in <top (required)>'
9: from /var/lib/gems/2.7.0/gems/autoluv-0.3.1/bin/autoluv:26:in rescue in <top (required)>' 8: from /var/lib/gems/2.7.0/gems/autoluv-0.3.1/lib/autoluv.rb:46:in notify_user'
7: from /var/lib/gems/2.7.0/gems/autoluv-0.3.1/lib/autoluv.rb:29:in log' 6: from /usr/lib/ruby/2.7.0/fileutils.rb:211:in mkdir_p'
5: from /usr/lib/ruby/2.7.0/fileutils.rb:211:in each' 4: from /usr/lib/ruby/2.7.0/fileutils.rb:226:in block in mkdir_p'
3: from /usr/lib/ruby/2.7.0/fileutils.rb:226:in reverse_each' 2: from /usr/lib/ruby/2.7.0/fileutils.rb:228:in block (2 levels) in mkdir_p'
1: from /usr/lib/ruby/2.7.0/fileutils.rb:250:in fu_mkdir' /usr/lib/ruby/2.7.0/fileutils.rb:250:in mkdir': Permission denied @ dir_s_mkdir - /var/lib/gems/2.7.0/gems/autoluv-0.3.1/logs (Errno::EACCES)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I was trying to build it this morning on my macbook, I need to boot up my linux desktop later, not sure what's up with it but the build seems to not be cooperating from some weird reason. Will try to get an official updated image soon. |
Okay, made a couple other changes and built/pushed the latest image. Verified I'm getting an email - you should also be able to just use the image to send e-mail without other settings changes. I have a good setting in the image but cant push it to github without it getting invalidated as sendgrid monitors github. |
Somehow a directory lacks permissions to allow autoluv to create the log and subsequent subdirectories.
My docker container is exiting and the logs are showing the following. Granted, this is when I give it one of my old record locator. However, I think it is even dying early on a valid PNR code and not checking in the person. But I can't find a log for that error happening. So, I'm hoping if we fix this issue, it'll fix another related issue.
I found this because I was trying to test the SMTP email function. The autoluv docs say to give it a false record locator and fake name.
So, I fired up the container and launched a bash shell into it.
To me, it looks like it can't create the log directory. That would give me an error unless I ran this first:
sudo chmod a+w //var/lib/gems/2.7.0/gems/autoluv-0.3.1/
For example:
Then the email works (since I have a fixed ~swuser/.autoluv.env file with updated SMTP settings.
Which, as a side note, I'm providing that file via the volume mount on the CLI:
docker run -itd -v /path/on/local/filesystem/to/.autoluv.env:/home/swuser/.autoluv.env altodd/southwest-docker schedule PNRCODE FIRST LAST email@address.com
The text was updated successfully, but these errors were encountered: