How To Change Permissions Of 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.
1. Using the chmod Command: You can use the chmod command to change file permissions in Linux. For example, to give read and write permissions to the user, you can use the following command:
chmod u=rw filename
To give execute permission to the user, you can use this command:
chmod u+x filename
2. Using the chown Command:
The chown command is used to change the owner of a file in Linux. For example, to change the owner of the file to the user called username, you can use the following command:
chown username filename