1. A computer-implemented method for restricting privileges for a target process in an operating system, comprising: receiving a request from the target process to restrict the privileges; and executing a binary that processes the request using services provided by a kernel of the operating system, wherein the privileges are associated with filesystem access, and wherein restricting filesystem access for the target process involves: cloning the target process to: create a privileged process; and share filesystem information between the target process and the privileged process.