Which permissions does a Linux executable file has when it is executed by root?

cn flag

I am using CentOS 6.8.

I have an executable called railgun, whose user and group are both set to root.

I then use the root user to start it as a service, as below:

service railgun start

However, it produces a permission denied error:

/tmp/memcached.sock: connect: permission denied

I check the user & group for /tmp/memcached.sock and find both are "memcached". So I just wonder why railgun cannot access /tmp/memcached.sock since it is executed by root? Which permissions does it have when it is launched by root?

In my opinion, root can access anything. So the executable started by root also can access anything. Is that correct?

cn flag
You are using a version of CentOS that has been EOL for nearly a year but that's another song. Is the file itself executable by root?
alancc avatar
cn flag
@NasirRiley, yes it is executable by root.
in flag
Is SELinux enabled? If so, is there anything in the system logs regarding that socket file?

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.