1

The documentation for setfsuid() says:

Normally, the value of the filesystem user ID will shadow the value of the effective user ID.

Does "shadow the value" means that the value of the filesystem user ID will be used instead of the effective user ID?

If this is what it means, why did they say "Normally", is there a situation where the effective user ID will be used instead of the filesystem user ID?


Note that they also say the same thing for the filesystem group ID and the effective group ID in the setfsgid() documentation:

Normally, the value of the filesystem group ID will shadow the value of the effective group ID.

1

The part about shadowing refers to the following sentence:

In fact, whenever the effective user ID is changed, the filesystem user ID will also be changed to the new value of the effective user ID.

So, since usually programs don't change the FSUID (or even know about it!), it's always going to be the same as the EUID. The exception being programs that explicitly know to change it directly.

The FSUID is used for filesystem accesses, the EUID for other things. The rationale is there in the man page: the FSUID existed originally so that a file server could act on behalf of some regular user, but could not be affected by that same user via signals.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.