El Tue, 3 de Jun 2014 a las 11:18 PM, Mohit Agrawal <moagrawa@redhat.com> escribió:<br>
<blockquote type="cite"><div class="plaintext" style="white-space: pre-wrap;">Hi,

I want to block the device through the systemd cgroup so I have created a below unit file 

[Unit]
Description=mydevblock
[Service]
DeviceAllow=/dev/zero
ExecStart=/usr/bin/dd if=/dev/zero of=/root/file_1 bs=1M count=40
Restart=always
[Install]
WantedBy=multi-user.target


As per my understanding in this unit file I have allowed only /dev/zero device so dd command should not create the file_1 successfully it should give the error .</div></blockquote><div><br></div><div>I was under the impression that files that were not devices could be accessed just fine. If you had the output file as /dev/foo, then I would expect the command to fail, but this seems valid.</div><div><br></div><div>Best regards,</div><div>--</div><div>Cameron</div>