Skip to content
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

Find Umask issue soon #119

Open
hhorak opened this issue Aug 7, 2019 · 6 comments
Open

Find Umask issue soon #119

hhorak opened this issue Aug 7, 2019 · 6 comments

Comments

@hhorak
Copy link
Member

hhorak commented Aug 7, 2019

With umask set to 077, the image build and test might fail. While we might not fix this properly, it would be good to find out that the umask is the cause soon by having explicit check for umask during:

  • make build
  • a new function in test-lib.sh to be called in every test/run
@praiskup
Copy link
Contributor

praiskup commented Aug 8, 2019

This is probably broken in docker, for buildah, I reported containers/buildah#1305 some time ago.

@praiskup
Copy link
Contributor

praiskup commented Aug 8, 2019

But of course, ADD sth somewhere files which are manually created files by make can cause problems as well.

@pkubatrh
Copy link
Member

pkubatrh commented Aug 8, 2019

Just to sum up what issues we hit when investigating rhel8 CI issues (which had umask 077):

  • when generating source files distgen only explicitly sets permissions for files, not for directories the files are located in
  • when changing permissions during assemble the fix-permission script needs to run before any further cp commands are called (via hooks for example) to avoid missing permissions outside directories on which the fix-permission script is called
  • when copying files into new locations -a should be used to keep permissions in tact after ^ happens

@kubco2 I hope did not forget anything

@phracek
Copy link
Member

phracek commented Sep 19, 2019

Just to sum up what issues we hit when investigating rhel8 CI issues (which had umask 077):

* when generating source files distgen only explicitly sets permissions for files, not for directories the files are located in

* when changing permissions during `assemble` the `fix-permission` script needs to run before any further cp/mv commands are called (via hooks for example) to avoid missing permissions outside directories on which the `fix-permission` script is called

@pkubatrh I guess, fix-permission script has to be run after mv commands if you want to fix permissions otherwise mv will not have correct permissions. For cp command -a is enough. Am I right?

* when copying files into new locations `-a` should be used to keep permissions in tact after ^ happens

@kubco2 I hope did not forget anything

@pkubatrh
Copy link
Member

pkubatrh commented Sep 23, 2019

@pkubatrh I guess, fix-permission script has to be run after mv commands if you want to fix permissions otherwise mv will not have correct permissions

Afaik mv does not alter the inode of the file moved in any way so fix-permission should not need to be re-run after the move.

Edit: I noticed I had a mention of mv in my previous comment for some reason so I removed it to avoid further confusion.

@ppisar
Copy link

ppisar commented Sep 23, 2019 via email

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

No branches or pull requests

5 participants