Loading...
Linux Interview Questions

File Permission

File Permission

1.What are file permissions in Linux .How do you change permissions?
A) Linux uses read (r), write (w), execute (x) permissions for owner, group, and others.
Using chmod
 

2. How do you check file permissions?
A)

ls -l filename

3. How do you change file ownership?
A) 

chown username:groupname file.txt

4.How do you change only the group ownership?
A)

chgrp groupname file.txt

5.What is the difference between chmod 777 and chmod 755?
A)

  • 777 → everyone can read, write, execute
  • 755 → owner can read/write/execute, others read/execute only
6. What is umask?
A)

  • Default permission applied when creating a new file.
  • Example: umask 022 → files: 644, directories: 755
  • Leave a Reply

    Your email address will not be published. Required fields are marked *