Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

How to update bashrc to include default umask #2628

Open
alpana17 opened this issue Nov 6, 2019 · 2 comments
Open

How to update bashrc to include default umask #2628

alpana17 opened this issue Nov 6, 2019 · 2 comments

Comments

@alpana17
Copy link

alpana17 commented Nov 6, 2019

/etc/bash/bashrc is read-only file As /etc/bash/bashrc is symlink to /usr/share/bash/bashrc

To edit this file, I added

  • path: /etc/bash/bashrc
    filesystem: root
    append: true
    contents:
    inline: |
    umask 027
    in ignition file. But when I passed it to user-data while launching the machine, it gave me error "Connection timeout"

Then I tried with same ignition just removed bashrc stuff, things worked as desired.

So, how can I make desired changes to bashrc?

@bgilbert
Copy link
Contributor

bgilbert commented Nov 7, 2019

Add a file with a .sh extension to /etc/profile.d.

@alpana17
Copy link
Author

alpana17 commented Nov 8, 2019

umask in /etc/profile or /etc/profile.d is applicable for login users only
I wanted to add in bashrc to apply usmask to nologin users
How can this be done?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants