Skip to main content
edited body
Source Link
Nasir Riley
  • 12.3k
  • 2
  • 26
  • 30

The r means that you can read the directory or the file itself. The x on a directory means that it can be traversed.

With the way that you have the permission set in your question, users and groups other than patrick can't enter the directory or list its contents. They can run ls directly on the contents of the directory but it will just return permission denied instead of giving any info.

If you give x permissions on the directory and nothing else then they can cd into the directory. IFIf they run ls inside of the directory then it will give them permission denied but if they know or can guess the name of files inside then they can run ls directly on them and see that they exist. They can also read the contents of the file(s) with cat or vim or another text editor if they have read permissions on it.

If you give r permissions on the directory and nothing else then the user can't cd into the directory but they can run ls on it and see its contents although they can't run ls against the file(s) itself or use cat or vim to see the contents.

The r means that you can read the directory or the file itself. The x on a directory means that it can be traversed.

With the way that you have the permission set in your question, users and groups other than patrick can't enter the directory or list its contents. They can run ls directly on the contents of the directory but it will just return permission denied instead of giving any info.

If you give x permissions on the directory and nothing else then they can cd into the directory. IF they run ls inside of the directory then it will give them permission denied but if they know or can guess the name of files inside then they can run ls directly on them and see that they exist. They can also read the contents of the file(s) with cat or vim or another text editor if they have read permissions on it.

If you give r permissions on the directory and nothing else then the user can't cd into the directory but they can run ls on it and see its contents although they can't run ls against the file(s) itself or use cat or vim to see the contents.

The r means that you can read the directory or the file itself. The x on a directory means that it can be traversed.

With the way that you have the permission set in your question, users and groups other than patrick can't enter the directory or list its contents. They can run ls directly on the contents of the directory but it will just return permission denied instead of giving any info.

If you give x permissions on the directory and nothing else then they can cd into the directory. If they run ls inside of the directory then it will give them permission denied but if they know or can guess the name of files inside then they can run ls directly on them and see that they exist. They can also read the contents of the file(s) with cat or vim or another text editor if they have read permissions on it.

If you give r permissions on the directory and nothing else then the user can't cd into the directory but they can run ls on it and see its contents although they can't run ls against the file(s) itself or use cat or vim to see the contents.

Source Link
Nasir Riley
  • 12.3k
  • 2
  • 26
  • 30

The r means that you can read the directory or the file itself. The x on a directory means that it can be traversed.

With the way that you have the permission set in your question, users and groups other than patrick can't enter the directory or list its contents. They can run ls directly on the contents of the directory but it will just return permission denied instead of giving any info.

If you give x permissions on the directory and nothing else then they can cd into the directory. IF they run ls inside of the directory then it will give them permission denied but if they know or can guess the name of files inside then they can run ls directly on them and see that they exist. They can also read the contents of the file(s) with cat or vim or another text editor if they have read permissions on it.

If you give r permissions on the directory and nothing else then the user can't cd into the directory but they can run ls on it and see its contents although they can't run ls against the file(s) itself or use cat or vim to see the contents.