How to check permissions of a file in the Linux system?

0 votes

Hi Guys,

I am new in Linux security concepts. I don't know too much about permissions and security. Can anyone tell me how can I check the permissions of a file?

Aug 13 in Linux Administration by akhtar
• 33,720 points
148 views

1 answer to this question.

0 votes

Hi@akhtar,

If you prefer using the command line, you can easily find a file’s permission settings with the ls command, used to list information about files/directories. You can also add the –l option to the command to see the information in the long list format.

$ ls -l passwd
-rw-r--r--. 1 root root 2653 Aug 13 16:36 passwd

Here you can see that the user only has read power to passwd file.

answered Aug 13 by MD
• 79,930 points

Related Questions In Linux Administration

0 votes
1 answer

How to change the group of a folder in Linux system?

Hi@akhtar, You can use chgrp command in your ...READ MORE

answered Aug 14 in Linux Administration by MD
• 79,930 points
75 views
0 votes
1 answer

How to change the owner of any folder in Linux system?

Hi@akhtar, Linux system has one command named chown. This ...READ MORE

answered Aug 13 in Linux Administration by MD
• 79,930 points
102 views
0 votes
2 answers

how to loop through the content of a file using bash

#!/bin/bash for i in  `cat peptides.txt` do echo $i done READ MORE

answered Sep 4 in Linux Administration by Prakash K. Aithal
918 views
0 votes
1 answer

How to find the group associated with a user in linux?

To list all the groups groups or to list ...READ MORE

answered Jun 20, 2019 in Linux Administration by DareDev
• 6,870 points
206 views
0 votes
1 answer
0 votes
1 answer

-bash: cd: /root/: Permission denied

Hi@akhtar, You got this error because your user ...READ MORE

answered Aug 13 in Linux Administration by MD
• 79,930 points
3,379 views
0 votes
1 answer

ls: cannot open directory '.': Permission denied

Hi@akhtar, You got this error because your user ...READ MORE

answered Aug 13 in Linux Administration by MD
• 79,930 points
1,069 views
0 votes
1 answer

How to remove write permission from a folder in Linux system?

Hi@akhtar, You can use chmod command to remove ...READ MORE

answered Aug 13 in Linux Administration by MD
• 79,930 points
88 views
0 votes
1 answer

How to check permissions of a folder in the Linux system?

Hi@akhtar, You can use ls command to check ...READ MORE

answered Aug 13 in Linux Administration by MD
• 79,930 points
139 views
0 votes
1 answer

How to give the read power of a folder in Linux system?

Hi@akhtar, You can use chmod command in your ...READ MORE

answered Aug 13 in Linux Administration by MD
• 79,930 points
86 views