Is it possible for a user to have a write access to a file and not be able to read it? How is it possible?
I tried the following commands:
debianbox@debian:~/posix/io$ touch filetest
debianbox@debian:~/posix/io$ ls -l filetest
-rw-r--r-- 1 debianbox debianbox 0 14 oct. 03:10 filetest
debianbox@debian:~/posix/io$ echo "Hello World" > filetest
debianbox@debian:~/posix/io$ cat filetest
Hello World
debianbox@debian:~/posix/io$ chmod u-r filetest
debianbox@debian:~/posix/io$ cat filetest
cat: filetest: Permission forbidden
debianbox@debian:~/posix/io$
As you can see here, I have write but not read access on this file. How can this be possible? Is this considered as a bug? If not, in what situation would this be useful?