by markeganfuller · 13y ago · 0 comments
-rw-r--r-- 1 root root 0 Jun 10 17:28 test
python hello.py > test
bash: test: Permission denied
echo $?
1But note the test isn't about whether you can open the file successfully, but about detecting writes to an open file failing (e.g. because the disk becomes full during writing).