How To Change User For a File In Linux?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To change the user for a file in Linux, you can use the chown command. This command allows you to change the user and group ownership of a file. The syntax for using chown is:
chown [OPTION]… [OWNER][:[GROUP]] FILE…
For example, if you wanted to change the user for the file “myfile.txt” to the user “bob”, you would use the following command:
chown bob myfile.txt