Re: difference between read permission and executing permission

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/9/12 Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx>:
> On Sun, Sep 12, 2010 at 00:28, Parmenides <mobile.parmenides@xxxxxxxxx> wrote:
>> Hi,
>>
>>   For a specified directory, we can go through it when the kernel
>> parsing path, though we can not read it. Actually, parsing path also
>> need read the directory file. So, how does the kernel distinguish
>> between these two permission?
>
Sorry for replying so late due to some trifles. For a directory, if it
is allowed to read, that means we can list all items in its directory
file, namely that we can read it completely. If it is allowed to
execute, that means we can go through it in a process of path parsing.
Path parsing will open every directory in a specified path. For
example, when parsing a path like /home/parmenides/src/hello.c, the
kernel will open a sequence of directory files, namely /, /home,
/home/parmenides and /home/parmenides/src, and read its subdirectory
for each. So, both of read permission and executing permission mean
that the kernel need to read the corresponding directory file. As
such, the common 'readable' has two meanings for a directory. One
corresponds to read the directory file when listing it, the other
corresponds to read the directory file when paring path.

On the other hand, system call opendir(const char *pathname) has no
way to distinguish these two meanings whereas both listing and path
parsing need call opendir(). My quesition is exactly that how these
two permissions take their effect.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux