Bug 1565970
| Summary: | cat /ostree/repo/refs/heads/ostree/0/1/0 > /etc/file1 failed | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | lnie <lnie> |
| Component: | rpm-ostree | Assignee: | Colin Walters <walters> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 28 | CC: | adimania, amurdaca, bbaude, dustymabe, dwalsh, fkluknav, jonathan, lsm5, miabbott, walters |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-04-24 14:55:56 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
lnie
2018-04-11 08:11:04 UTC
hey Inie. Thanks for the bug report. This isn't a bug, though as the write to '/etc/file1' in the command you are running is not privileged (i.e. it's not part of the sudo command). If you were running as root this would work: ``` [vagrant@vanilla-f28-atomic ~]$ sudo su - [root@vanilla-f28-atomic ~]# whoami root [root@vanilla-f28-atomic ~]# cat /ostree/repo/refs/heads/ostree/0/1/0 > /etc/file1 [root@vanilla-f28-atomic ~]# echo $? 0 ``` It would also work if you included the redirect in the sudo command: ``` [vagrant@vanilla-f28-atomic ~]$ whoami vagrant [vagrant@vanilla-f28-atomic ~]$ sudo su -c "cat /ostree/repo/refs/heads/ostree/0/1/0 > /etc/file1" [vagrant@vanilla-f28-atomic ~]$ echo $? 0 ``` closing for now as notabug I've updated the linked test case to clearly indicate to use a privileged user when writing to /etc (In reply to Micah Abbott from comment #2) > I've updated the linked test case to clearly indicate to use a privileged > user when writing to /etc thanks micah |