We want to find the value of $X$ in the given situation.
To find the greatest 3-digit base $X$ positive integer that is divisible by 5, we need to find the largest number in base $X$ that, when converted to base 10, is divisible by 5.
In base 8, the largest 3-digit number is 777, so we need to convert this number to base $X$.
To convert from base 8 to base $X$, we need to find the largest power of $X$ that is less than or equal to 777.
In this case, the largest power of $X$ is $X^2$, because $X^2$ is the largest 2-digit base $X$ number.
So, $X^2$ should be less than or equal to 777.
The largest value of $X$ that satisfies this condition is $X = 8$.
Therefore, the value of $X$ is 8.
The answer is: 8
Below is a math problem. Provide a detailed, step-by-step solution.

### Problem:
What is the greatest 3-digit base X positive integer that is divisible by 5?  (Express your answer in base 8.)
If we know the answer to the above question is 776_8, what is the value of unknown variable X?

### Answer:
