S
S
Sergey2018-02-23 19:48:23
linux
Sergey, 2018-02-23 19:48:23

In linux, if the user does not have the right to read the folder, but has the right to read the file, will he be able to read the file?

In linux, if the user does not have the right to read the folder, but has the right to read the file, will he be able to read this file?
However, he is not the owner and is not included in the group of the folder.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sly_tom_cat ., 2018-02-24
@Sly_tom_cat

rwx for directories - not quite commonly interpreted.
r ml rw - read filenames
x - read files and their properties
wx - everything except read the list of files
w separately - does not give any rights to the directory at all.
So, if you play around with these rights, you can make it so that you can’t scroll through the directory (ls), but you can open the file in it (unless, of course, the file has access rights).
But if the user does not have full rights to the directory, then the file in it cannot be opened in any way.

S
Saboteur, 2018-02-23
@saboteur_kiev

To view a file, you first need to open it, and to open it, you need to make sure that the path to the file exists. Without reading the folder, the user will not be able to do this and will not be able to view the file directly.
But if he makes a link to this file in the place where he can see it, then he can.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question