How to check who owns a file in Linux

Jugo Mobile
By
Jugo Mobile
Jugo Mobile is a platform dedicated to high-quality content in gaming, sports, and tech. Engage with high-quality content and connect with fellow enthusiasts and experts. Explore...
5 Min Read

If you want to check who owns a file, Linux works very differently than other systems. There is no option to simply right click on a file and go to Properties either Get information as in Windows or macOS.

Also, file ownership is different on Linux. Each file has its owner and a group to which it belongs. This information can be useful to know in many situations, such as resolving permissions issues.

There are three common ways to view the owner of a file in Linux. This is what they are.

Command “Is -I”

The “Is -I” command is the most convenient way to view the owner of a file. All you have to do is follow these steps.

  1. Open the terminal.
    1710271950 986 How to check who owns a file in
  2. Write Is -I filename.
    1710271950 251 How to check who owns a file in
  3. See the third column for the owner.
    1710271950 879 How to check who owns a file in

Of course you will replace file name with the actual file name. So if the name was file123, the command would be:

% ls -l file123

This command will give you a lot of other valuable information.

  • Type of file
  • Permissions
  • Cluster
  • Size
  • Date and Time
  • hard links

The result will look like this:

-rw-r--r-- 2 mark admin 246 Jun 3 08:21 file123

The information is the following.

  • -rw-r–r–: file mode
  • 2 – number of links
  • brand – Owner’s name
  • administration – Group name
  • 246 – file size (number of bytes)
  • June 3 08:21– month and day the file was modified, followed by the exact hour and minute
  • File123 – File name

Search command

People often use the Find command to search for files within a directory. But with the Print feature, you can also list file owners.

You can do this with the following command syntax.

# find /dir -printf '%u\n'

You can also use more advanced filtering to show only unique users by adding the -you option:

# find /dir -printf '%u\n' | sort -t: -u

Finally, you can see the group the file belongs to by adding the %gram option:

# find /dir -printf '%u:%g\n' | sort -t: -u

Statistics command

Statistics is another very useful command that you can use to get many details about a file, including the owner. You can enter multiple file names and modify the command with many options that show you different information.

The command is very easy to use. All you have to do is write “stat filename.”

You’ll be able to see the device the file is on, who has access, when the most recent changes were made, etc.

If you only want to see the owner and group of the file, you can use the %U and %G options. So if we use the example from file 123 again, the command will be:

stat -c “%U %G” file123

How to change the owner of a file in Linux

If you want to change the owner of a file, you can use the chown command. Open the terminal and type “chown username filename”. So for example, if you want Mark to be the owner of file 123, you would write “chown mark file123.”

You can change the file group using the same function. If you want to change both the owner and the group, type “chown username:groupname filename”.

Get the details you need

As you can see, it is not difficult to find the owner, group and other relevant details of a file in Linux. All of these commands are easy to use, so you’ll be able to get the information you need in no time. Additionally, you can modify them with different options to refine your search.

Do you have any other tips and tricks for navigating Linux files and checking ownership? If so, feel free to share them in the comments p below.

Share This Article
Follow:
Jugo Mobile is a platform dedicated to high-quality content in gaming, sports, and tech. Engage with high-quality content and connect with fellow enthusiasts and experts. Explore the latest trends and innovations in our vibrant community. Join us and experience the future today!
Leave a Comment
Grow your brand and reach a larger audience. Advertise with us today and get noticed by thousands.
© 2025 Jugo Mobile. All Rights Reserved.