mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Installing a file in the /root directory.
@ 2020-06-23 12:20 Mircea Ciocan
  2020-06-23 13:59 ` Alexander Dahl
  0 siblings, 1 reply; 4+ messages in thread
From: Mircea Ciocan @ 2020-06-23 12:20 UTC (permalink / raw)
  To: ptxdist

Hello everybody,

I want to install /root/.ssh/authorized_keys file from my board 
projectroot directory.

Sadly even after reading the previous mail regarding a similar issue 
with systemd directory I'm not able to correctly install the file.

I can create the /root/.ssh empty directory with the correct 0700 
permissions, but I haven't found any way of putting a file there, 
everything fails with:

Incompatible ownership or permissions for '/root':
dropbear: 0.0 0755 (implicit)
rootfs: 0.0 0700

One of these packages must be fixed!

Could a kind soul give me a quick hint how to do this, in my 
projectroot, the directories and file are having proper permissions.


Line that fails:

         @$(call install_alternative, dropbear, 0, 0, 0600, 
/root/.ssh/authorized_keys, n)

Many thanks,

Mircea






_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] Installing a file in the /root directory.
  2020-06-23 12:20 [ptxdist] Installing a file in the /root directory Mircea Ciocan
@ 2020-06-23 13:59 ` Alexander Dahl
  2020-06-23 15:16   ` Mircea Ciocan
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Dahl @ 2020-06-23 13:59 UTC (permalink / raw)
  To: ptxdist; +Cc: Mircea Ciocan


[-- Attachment #1.1: Type: text/plain, Size: 1385 bytes --]

Hei hei,

On Tue, Jun 23, 2020 at 02:20:30PM +0200, Mircea Ciocan wrote:
> I want to install /root/.ssh/authorized_keys file from my board projectroot
> directory.
> 
> Sadly even after reading the previous mail regarding a similar issue with
> systemd directory I'm not able to correctly install the file.
> 
> I can create the /root/.ssh empty directory with the correct 0700
> permissions, but I haven't found any way of putting a file there, everything
> fails with:
> 
> Incompatible ownership or permissions for '/root':
> dropbear: 0.0 0755 (implicit)
> rootfs: 0.0 0700
> 
> One of these packages must be fixed!
> 
> Could a kind soul give me a quick hint how to do this, in my projectroot,
> the directories and file are having proper permissions.
> 
> 
> Line that fails:
> 
>         @$(call install_alternative, dropbear, 0, 0, 0600,
> /root/.ssh/authorized_keys, n)

This is not part of ptxdist master branch 'rules/dropbear.make' and
from a quick glance in Git it was not for the last 10 years.  Do you
have a customized rule in your BSP?

Greets
Alex

-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN     | speech censured, the first thought forbidden, the
 X  AGAINST      | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] Installing a file in the /root directory.
  2020-06-23 13:59 ` Alexander Dahl
@ 2020-06-23 15:16   ` Mircea Ciocan
  2020-06-24 10:01     ` Michael Olbrich
  0 siblings, 1 reply; 4+ messages in thread
From: Mircea Ciocan @ 2020-06-23 15:16 UTC (permalink / raw)
  To: ptxdist

On 23.06.20 15:59, Alexander Dahl wrote:
> Hei hei,
>
> On Tue, Jun 23, 2020 at 02:20:30PM +0200, Mircea Ciocan wrote:
>> I want to install /root/.ssh/authorized_keys file from my board projectroot
>> directory.
>>
>> Sadly even after reading the previous mail regarding a similar issue with
>> systemd directory I'm not able to correctly install the file.
>>
>> I can create the /root/.ssh empty directory with the correct 0700
>> permissions, but I haven't found any way of putting a file there, everything
>> fails with:
>>
>> Incompatible ownership or permissions for '/root':
>> dropbear: 0.0 0755 (implicit)
>> rootfs: 0.0 0700
>>
>> One of these packages must be fixed!
>>
>> Could a kind soul give me a quick hint how to do this, in my projectroot,
>> the directories and file are having proper permissions.
>>
>>
>> Line that fails:
>>
>>          @$(call install_alternative, dropbear, 0, 0, 0600,
>> /root/.ssh/authorized_keys, n)
> This is not part of ptxdist master branch 'rules/dropbear.make' and
> from a quick glance in Git it was not for the last 10 years.  Do you
> have a customized rule in your BSP?
>
> Greets
> Alex
>
That's the only "customization" made, I want to install an access key, 
the rest of the rule is vanilla dropbear.make


Cheers,
Mircea


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] Installing a file in the /root directory.
  2020-06-23 15:16   ` Mircea Ciocan
@ 2020-06-24 10:01     ` Michael Olbrich
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2020-06-24 10:01 UTC (permalink / raw)
  To: ptxdist; +Cc: Mircea Ciocan

On Tue, Jun 23, 2020 at 05:16:45PM +0200, Mircea Ciocan wrote:
> On 23.06.20 15:59, Alexander Dahl wrote:
> > Hei hei,
> > 
> > On Tue, Jun 23, 2020 at 02:20:30PM +0200, Mircea Ciocan wrote:
> > > I want to install /root/.ssh/authorized_keys file from my board projectroot
> > > directory.
> > > 
> > > Sadly even after reading the previous mail regarding a similar issue with
> > > systemd directory I'm not able to correctly install the file.
> > > 
> > > I can create the /root/.ssh empty directory with the correct 0700
> > > permissions, but I haven't found any way of putting a file there, everything
> > > fails with:
> > > 
> > > Incompatible ownership or permissions for '/root':
> > > dropbear: 0.0 0755 (implicit)
> > > rootfs: 0.0 0700
> > > 
> > > One of these packages must be fixed!
> > > 
> > > Could a kind soul give me a quick hint how to do this, in my projectroot,
> > > the directories and file are having proper permissions.
> > > 
> > > 
> > > Line that fails:
> > > 
> > >          @$(call install_alternative, dropbear, 0, 0, 0600,
> > > /root/.ssh/authorized_keys, n)
> > This is not part of ptxdist master branch 'rules/dropbear.make' and
> > from a quick glance in Git it was not for the last 10 years.  Do you
> > have a customized rule in your BSP?
> > 
> > Greets
> > Alex
> > 
> That's the only "customization" made, I want to install an access key, the
> rest of the rule is vanilla dropbear.make

1. Don't overwrite the dropbear package for this. Just create a new package
   with the 'files' template to install your file.

2. You need to explicitly create /root in your package (or dropbear if you
   want to stick with that) with the same permissions as the rootfs
   package. And you should probably create /root/.ssh with the correct
   permissions as well:

	@$(call install_copy, dropbear, 0, 0, 0700, /root)
	@$(call install_copy, dropbear, 0, 0, 0700, /root/.ssh)
	@$(call install_alternative, dropbear, 0, 0, 0600, \
		/root/.ssh/authorized_keys, n)

Note, there is a bug in the latest ptxdist release. I think this will still
fail, so you need to copy scripts/lib/ptxd_lib_check_dir_permissions.awk
from ptxdist master into your BSP.

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-24 10:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-23 12:20 [ptxdist] Installing a file in the /root directory Mircea Ciocan
2020-06-23 13:59 ` Alexander Dahl
2020-06-23 15:16   ` Mircea Ciocan
2020-06-24 10:01     ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox