Can't change permissions on RAM disk Why can't I set root as folder owner? 

diskutil erasevolume HFS+ "VTest" $(hdiutil attach -nomount ram://1165430)
cd /Volumes/VTest/
mkdir TDir
sudo chown root:wheel TDir/
ls -l
drwxr-xr-x  2 user  staff  68  7 янв 16:06 TDir


But it works fine for folders on any other drive(physical)
Creating a RAM disk this way disables ownership. To enable ownership additionally enter:

sudo diskutil enableOwnership diskX


To add folders use sudo mkdir folder_name. The folder has root:wheel 755 permissions then, but you can change ownership to other users later.