sudo chown reports that it has changed ownership but stat shows that they remain unchanged. I have absolutely no clue as to what might be causing this behavior. Commands and their output are listed below:
iceberg@iceberg-Vostro-3446:/media/iceberg/Data3/Open_Source_Projects/container$ stat ./logs/mysql/tomcat/error.log
File: './logs/mysql/tomcat/error.log'
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 802h/2050d Inode: 397758 Links: 1
Access: (0777/-rwxrwxrwx) Uid: ( 1000/ iceberg) Gid: ( 1000/ iceberg)
Access: 2017-08-03 21:53:37.845481100 +0530
Modify: 2017-08-03 21:53:37.845481100 +0530
Change: 2017-08-03 21:53:37.845481100 +0530
Birth: -
iceberg@iceberg-Vostro-3446:/media/iceberg/Data3/Open_Source_Projects/container$ sudo chown -vR 999:999 ./logs/mysql/tomcat/error.log
[sudo] password for iceberg:
changed ownership of './logs/mysql/tomcat/error.log' from iceberg:iceberg to 999:999
iceberg@iceberg-Vostro-3446:/media/iceberg/Data3/Open_Source_Projects/container$ stat ./logs/mysql/tomcat/error.log
File: './logs/mysql/tomcat/error.log'
Size: 0 Blocks: 0 IO Block: 4096 regular empty file
Device: 802h/2050d Inode: 397758 Links: 1
Access: (0777/-rwxrwxrwx) Uid: ( 1000/ iceberg) Gid: ( 1000/ iceberg)
Access: 2017-08-03 21:53:37.845481100 +0530
Modify: 2017-08-03 21:53:37.845481100 +0530
Change: 2017-08-03 21:53:37.845481100 +0530
Birth: -
Edit 1: Updated information related to file locations.
Edit 2: The filesystem being used is NTFS. Windows partition is mounted inside ubuntu.
chowndoesn't produce any kind of output... which makes me suspicious about thechowncommand you're actually using. Try runningwhich chown, and see what kind of file it is (the official one should be a binary). If it's a script, it's possibly a wrapper doing who knows what else. – nKn Aug 03 '17 at 18:08-voption of chown is used for--verboseand is responsible for output.-coption is used to report any changes that are made bychownRunningwhich chownresults in/bin/chownandcat /bin/chownshowed some illegible output, I think it is a binary – Ayushya Aug 03 '17 at 18:10