asked 113k views
3 votes
The permission -rwSr-r- represented in octal expression will be ________.

1) 777
2) 2666
3) 4744

1 Answer

3 votes

Final answer:

The permission string -rwSr-r- translates to 644 in octal, as the user has read, write and set UID permissions, and group and others have only read permissions.

Step-by-step explanation:

The permission -rwSr-r- represented in octal expression is not 777, 2666, or 4744. Instead, this permission string translates to an octal representation based on Unix permission bits. The first character indicates it's a file (not part of the octal notation), the following sets of 'r', 'w', and 'S' indicate read, write, and set UID permissions respectively.

Breaking down the permissions:

  • User: read (r), write (w), set UID (S) = 4 (read) + 2 (write) + 4 (set UID) = 6
  • Group: read (r) = 4
  • Others: read (r) = 4

Therefore, the correct octal representation is 644. It seems there might have been an error with the provided options or with the original permission string.

answered
User Jayanti
by
8.2k points

Related questions

1 answer
1 vote
84.0k views
1 answer
5 votes
231k views
1 answer
0 votes
46.9k views