Skip to main content
Source Link
Ravi
  • 3.9k
  • 13
  • 49
  • 67

ftp: in remote machine, file owner changes with the change in username used for logging in the remote machine

It was a wonder for me to see why the file owner changes when I log in the remote machine with different usernames.

Please see: 1st I logged in a remote machine using username : peacenews. I entered a directory (pwd outputs / as the directory)

When I run ls to see the files there, I get the below: (I am only showing the last few lines of the output)

-rwx rwxrwx    1 peacenew 504      198311940 Oct  4 02:21 Rotary club ORC, Delhi .m2p 
drwxrwxrwx    2 peacenew 504          4096 Sep 19 23:09 Vizianagaram, AP 
-rwxrwxrwx    1 peacenew 504      296817474 Oct  3 10:30 dehradun-prem.VOB 
226-Options: -l 
226 18 matches total 

Then I logged out and reconnected as anonymous user. This time also I logged in the same directory (having the same filenames) See the output of ls please (last few lines only):

-rwxrwxrwx    1 504      504      198311940 Oct  4 02:21 Rotary club ORC, Delhi .m2p 
drwxrwxrwx    2 504      504          4096 Sep 19 23:09 Vizianagaram, AP 
-rwxrwxrwx    1 504      504      296817474 Oct  3 10:30 dehradun-prem.VOB 
226-Options: -l 
226 18 matches total 

Have a note at the 3rd column and compare with the previous one. Group owner for the files are the same but file owner changes. How come? It's a wonder!!!