I'm facing into strange behavior. I'm writing to raw device (attached disk in Linux) in python using this code:
with open("/dev/xvdf", 'w') as disk:
disk.write("aaa")
before I executed this code the disk privileges were:
brwxrwxrwx 1 root disk 202, 80 Apr 23 07:59 /dev/xvdf
After executing this code it changed to:
brw-rw---- 1 root disk 202, 80 Apr 23 07:59 /dev/xvdf
Thanks for your help