I'm working as a root so I should have permission to create any file
That is simply not true. There are a number of possibilities that can prevent even root to write to a file (or create it):
- file is readonly
- directory if readonly
- filesystem is readonly (for example CDROM)
- out of filehandles
- out of memory
- disk full
- file system errors that implicitly make the filesystem readonly
- file locked by another program
- directory locked by another program (most likely kernel during some directory move operations)
- file on a network filesystem where you don't have permissions
- Some "virtual" files can't be written to (/proc/*)
- ...The list goes on and on and on to ever more obscure "error" conditions...
BREW /very/strong/coffee HTTP/1.1
Host: goodmorning.example.com
418 I'm a teapot