You are not logged in.

#1 2017-09-22 16:47:17

magyar
Member
Registered: 2014-02-28
Posts: 7

[SOLVED] Strange permissions issues when booting from RAM

I created a project (ramroot) that allows a user to load the root filesystem entirely into RAM during the boot process.

It works great and runs really fast, however, there are some tiny quirks (permissions issues?) that occur when booting from RAM that I can't seem to figure out.  When booting from RAM (and only when booting from RAM) the following to things occur:

  • ping doesn't work without sudo permissions (ping: socket: Permission denied)

  • my /etc/issue file doesn't display correctly on initial login (weird line breaks and such)

The file permissions and ownerships of /bin/ping and /etc/issue are unchanged when booting from RAM.

Although these issues appear to be the only problems, and they don't much affect functionality (I can still browse the web / update packages), I would like to know what is going on.  If there are some strange permission issues going on, it could affect other things down the road.

Any thoughts?

Last edited by magyar (2017-09-22 22:14:02)

Offline

#2 2017-09-22 19:04:27

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [SOLVED] Strange permissions issues when booting from RAM

Is SELinux enabled?

Quick sanity check: The actual "ping" file is "/usr/bin/ping", correct? Arch Linux kind of got rid of "/bin"...

Offline

#3 2017-09-22 19:16:51

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: [SOLVED] Strange permissions issues when booting from RAM

Not sure, but be aware that ping uses capabilities, an alternative to suid.  I'll bet your file system does not support that or it is not configured properly.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2017-09-22 22:12:18

magyar
Member
Registered: 2014-02-28
Posts: 7

Re: [SOLVED] Strange permissions issues when booting from RAM

Thanks for the input.  Capabilities are new to me (something everyday!).  Problem solved upon further investigation:

It seemed the issue had something to do with when I copied the root filesystem to RAM during the initramfs phase of boot.  I first created a zram partition, gave it an ext4 filesystem, then copied the root filesystem via cp -a.  According to the cp man page, this should preserve all extended attributes.  However, in order to get the full functionality of cp during the initial boot process, the cp binary must be added to build hook:

build() {
   ...
   add_binary cp
   ...
}

Offline

Board footer

Powered by FluxBB