Description of problem: When using non-default umask settings (as required by government agencies), rhevm-iso-uploader uploads images with incorrect permissions and VMs cannot access them. Version-Release number of selected component (if applicable): RHEV 3.2 How reproducible: Very Steps to Reproduce: 1. Create RHEV-M with the default local ISO domain, and set umask settings as required for most government agencies. (077) 2. Use rhevm-iso-uploader to upload an ISO to the ISO domain 3. Attempt to boot VM using that ISO. Actual results: Virtual machine failed to boot from attached ISO CD with error message "Boot failed: Could not read from CDROM (code 0003)" Expected results: Successful boot Additional info: While we know that the non-default umask is the problem here, there are enough users in hardened/secure environments that the rhevm-iso-uploader tool should check permissions upon upload, rather than using the default umask
I assume that image-uploader will be affected as well. The strange thing is that iso-uploader sets umask for having 0660 file access mode (copy_file method). Maybe it's not enough, since after the copy it seems that the file are renamed and that's done with system umask. I think that it's better to totally ignore the umask and use chmod on the file to ensure it's permissions.
Hi Allan, can you confirm that the issue on iso-uploader affects only uploads done through NFS and not uploads done through SSH ?
(In reply to Sandro Bonazzola from comment #1) > I think that it's better to totally ignore the umask and use chmod on the > file to ensure it's permissions. Can't chmod over NFS mounted domain. Will fix setting correct umask while renaming.
Patch pushed on master branch for 3.3.0: upload: nfs: set correct umask while renaming set the correct umask while renaming the temporary file to destination file. Avoid to have incorrect access bits on systems with not standard umask (like 077) (setting again needinfo flag, removed accidentally in previous comment)
(In reply to Sandro Bonazzola from comment #1) > I assume that image-uploader will be affected as well. image uploader should not be affected, no renaming after file copy.
(In reply to Sandro Bonazzola from comment #2) > Hi Allan, can you confirm that the issue on iso-uploader affects only > uploads done through NFS and not uploads done through SSH ? I don't have a system I can reproduce this on, and the customer closed the case as soon as they discovered the permissions issue. I filed the bug because that shouldn't be normal behaviour.
(In reply to Allan Voss from comment #6) > I don't have a system I can reproduce this on, and the customer closed the > case as soon as they discovered the permissions issue. I filed the bug > because that shouldn't be normal behaviour. Ok. no problem. I've checked the code and ssh upload uses chown on remote system so there can't be umask issue there.
merged upstream master for 3.3.0.
Verified on is9.1, same as bug 990144 verified.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-0077.html