0
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.
What kind of filesystem is this file stored on? – duskwuff -inactive- – 2017-08-03T17:32:39.317
I am using zsh, maybe that might look confusing, I'll update the question with bash syntax, which is probably more popular and widely used. – Ayushya – 2017-08-03T18:02:53.567
No -- I mean the filesystem, not your shell. Is this directory mounted over FUSE or something else weird? Is it on a non-Linux filesystem like NTFS or FAT32? – duskwuff -inactive- – 2017-08-03T18:04:02.890
@duskwuff It is stored in a local filesystem, mounted in my media volumes. – Ayushya – 2017-08-03T18:04:11.870
Usually
chown
doesn't produce any kind of output... which makes me suspicious about thechown
command 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 – 2017-08-03T18:08:04.790-v
option of chown is used for--verbose
and is responsible for output.-c
option is used to report any changes that are made bychown
Runningwhich chown
results in/bin/chown
andcat /bin/chown
showed some illegible output, I think it is a binary – Ayushya – 2017-08-03T18:10:33.967@duskwuff it is NTFS filesystem. The windows filesystem is mounted in ubuntu – Ayushya – 2017-08-03T19:27:04.490