4

I can call sync without root privileges. Does it flush all buffers to disk? Is it the same as calling it with root privileges like sudo sync?

1

1 Answer 1

5

Yes,

sync

called with no arguments will cause all dirty buffers to be flushed to disk, regardless of the identity of the user running it.

This is also true of the other modes some implementations of sync support, although in file-based cases other limitations apply — the user running sync has to be able to open the file being synced.

See Why can an unprivileged user execute the `sync` command? for a discussion of the security aspects of this behaviour.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.