I want to check the owner and group of a file, but I get:

$ ls -hl canal.properties 
-rw-rw-r-- 1 500 499 514 Nov  4 19:12 canal.properties

500 and 499 are not human-readable, are there any other ways to check the owner and group of a file?

my system is

 $ uname -r

 $ id 499
 id: ‘499’: no such user
 $ id 500
 id: ‘500’: no such user

additional info: I'm using docker volume, the folder is rewritten by docker

  • 2
    Unless something funky is going on, the fact that they render as numerics indicates that the device you have the filesystem mounted on doesn't have a user/group mapped to those IDs. Maybe whatever piece of software uses that .properties file has a concept of what they should be named. If I had to take an educated guess, I'd suggest "canal" for both.
    – bxm
    Nov 4, 2019 at 12:59
  • Which operating system and version are you running now? Which operating system and version were you running when creating directories and files with those ID numbers? I think is was an old version, which created ID numbers around 500, while current versions of linux create ID numbers around 1000.
    – sudodus
    Nov 4, 2019 at 13:07
  • 1
    You should add more details to the question. Is the file on a local file system fixed to this computer? The user/group might have been deleted on the local system after creating the file. What is your OS and in which directory (full absolute path) did you find the file? Is the file on a removable storage media? The file might have been created on a different system which has a user with UID 500 and a group with GID 499.
    – Bodo
    Nov 4, 2019 at 13:12
  • ah, I'm using docker volume, so the folder is rewritten by docker
    – lily
    Nov 4, 2019 at 13:58
  • @lily please edit your question and add that information. That changes everything. Or, if you now understand what's happening, please post an answer explaining that the issue was caused by the docker container.
    – terdon
    Nov 4, 2019 at 14:27

1 Answer 1


This is a job for id.

$ id 0
uid=0(root) gid=0(root) groups=0(root)
$ id 499

If these files were created on a different system and copied over preserving their attributes, it is possible that these IDs correspond to a different user/group on this system (or no actual user/group at all).

  • I created the file, but I don't remember it is with root or my username, I tried using id, but the result is no such user
    – lily
    Nov 4, 2019 at 12:55
  • root maps to 0 thus, by elimination, I guess it was your user. Maybe your IDs changed for some reason... probably that you just need to chown and chgrp it back.
    – bxm
    Nov 4, 2019 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.