Question

In: Computer Science

The notation used in the above problem is called symbolic notation. Alternatively, we can use the...

The notation used in the above problem is called symbolic notation. Alternatively, we can use the 4-digit octal notation to specify, which is defined as follows: • Digits from left (most significant) to right (least significant): [special bits][owner bits][group bits][world bits] • Special bit digit = (4 if setuid) + (2 if setgid) + (1 if sticky), 0 for none of them • All other digits = (4 if readable) + (2 if writable) + (1 if executable), 0 for none of them For example, if no special bit is set on, the first digit should be a zero (i.e., “special bits”=0). For the owner bits, if the owner has read and write privileges, then the second digit should be (4 if readable) + (2 if writable) = 6 (i.e., “owner bits”=6). If group and world have no privilege, they will have a zero each, and the third and fourth digits should be 0 and 0, respectively (i.e., “group bits”=0 and “world bits”=0). The converted representation should then be “0600”. One of the useful resources for this representation is: https://en.wikipedia.org/wiki/File_system_permissions.

Convert each of the symbolic permissions to octal notation and each of the octal permissions to symbolic notation. a. -rw-r--r-- b. -rwxr-xr-x c. 0400 d. 1777 e. 4755

Solutions

Expert Solution

Based on the detailed description of the 4-digit representation of the data, we can do a mapping of the octal numbers as below(Along with their symbolic representation):

  • 7 - Read, Write, Execute (rwx)
  • 6 - Read, Write (rw-)
  • 5 - Read, Execute (r-x)
  • 4 - Read (r--)
  • 3 - Write, Execute (-wx)
  • 2 - Write (-w-)
  • 1 - Execute (--x)
  • 0 - None (---)

Along with the above representation, we have to consider the setuid, setgid and sticky character representation as well. This is called as extended POSIX representation of the permissions. When we have the extended representation, based on the significant octal digit's(Left Most digit in the 4-digit representation) value, the below conversion rules apply:

  • if it is 4: This means the setuid is enabled and so, the execute character will be updated to s. (x will be s and - will be S)
  • if it is 2 : This means the setgid is enabled and so, the execute character will be updated to s. (x will be s and - will be S)
  • if it is 1: That means, sticky or text attribute is enabled. In this case, the others section of the symbolic representation will have the update. The x will be represented as t and - as T.

Based on the above description, we will be converting the symbolic notation to octal representation and vice-versa:

  1. -rw-r--r-- : This symbolic notation's 4 parts / octal representation is (-) (rw-) (r--) (r--). Using the above reference, the symbolic representation is : 0644
  2. -rwxr-xr-x : This symbolic notation's 4 parts / octal representation is (-) (rwx) (r-x) (r-x). Using the above reference, the symbolic representation is : 0755
  3. 0400 : Using the reverse mapping of octal numbers to symbolic notation, we can see that 0400 will be : (-) (r--) (---) (---) = -r--------
  4. 1777 : Using the reverse mapping of octal numbers to symbolic notation, we can see that 1777 will be : (-) (rwx) (rwx) (rwt) = -rwxrwxrwt
  5. 4755 : Using the reverse mapping of octal numbers to symbolic notation, we can see that 4755 will be : (-) (rws) (r-x) (r-x) = -rwsr-xr-x

Related Solutions

Translate the following argument to symbolic notation (be sure to provide the dictionary) and then use...
Translate the following argument to symbolic notation (be sure to provide the dictionary) and then use a truth table to show that the argument is an invalid argument. State how the truth table shows that the argument is invalid. If Elle is a member of Delta Nu, then she comes from a rich family. Elle’s family is rich. Therefore, Elle belongs to Delta Nu.
Use symbolic notation to illustrate how the following computation would be performed in the following ISAs...
Use symbolic notation to illustrate how the following computation would be performed in the following ISAs X = (A + B * C) / (D - E * F) Stack Architecture [3Marks] Load Store Architecture [3Marks] Explain two scenarios where displacement addressing mode is useful in computer operations. [4Marks] Explain two challenges that designers faced with the use of a hardwired control unit. [2Marks] Does the interconnection structure in a computer have any implication on the performance? Explain your answer....
We will use shorthand notation and probability notation for random variables when working with normally distributed...
We will use shorthand notation and probability notation for random variables when working with normally distributed random variables. Suppose the vitamin C content of a particular variety of orange is distributed normally with mean 720 IU and standard deviation 46 IU. If we designate X = the vitamin C content of a randomly selected orange, then our shorthand notation is X~N(720 IU, 46 IU). Use this distribution of vitamin C content to answer the following questions: 1) What is the...
explain systematic review- the research methods that can be used to address the research problem above,...
explain systematic review- the research methods that can be used to address the research problem above, What is meta analysis -data collection methods can be used in the review of literature? The research topic is : Should Influenza vaccine be required for the elderly in USA.
Find the first five nonzero terms of the Maclaurin expansion of f(x)=e^-xcos(x) (Use symbolic notation and...
Find the first five nonzero terms of the Maclaurin expansion of f(x)=e^-xcos(x) (Use symbolic notation and fractions where needed.)
Find the linearization at x=a. f(x)=sin^7(x), a=π/4, (Use symbolic notation and fractions where needed.) Find the...
Find the linearization at x=a. f(x)=sin^7(x), a=π/4, (Use symbolic notation and fractions where needed.) Find the linearization of y=e^(√7x) at x=36. (Use symbolic notation and fractions where needed.)
Find the second-order Taylor polynomial for f(x,y)=8y^2e^(−x^2) at (1,1). (Use symbolic notation and fractions where needed.)...
Find the second-order Taylor polynomial for f(x,y)=8y^2e^(−x^2) at (1,1). (Use symbolic notation and fractions where needed.) p(x,y)p(x,y) = .
What are some ratios we can use to analyze an organization? What are they used to...
What are some ratios we can use to analyze an organization? What are they used to measure? Who uses these ratios?
6. For this problem we will use the fact that: ?????? = ??????? − ???? ?...
6. For this problem we will use the fact that: ?????? = ??????? − ???? ? ? = ? ? − ?(?) A company produces and sells copies of an accounting program for home computers. The total weekly cost (in dollars) to produce x copies of the program is ? ? = 8? + 500, and the weekly revenue for selling all x copies of the program is ? ? = 35? − 0.1?). a. Find a function, ?(?), for...
can the production of above-ground dry matter by the plant can be used for measuring photosynthesis.
can the production of above-ground dry matter by the plant can be used for measuring photosynthesis.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT