Return-Path: Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id A3015E016FB for ; Tue, 15 Oct 2013 03:02:27 -0700 (PDT) Received: by mail-bk0-f52.google.com with SMTP id e11so3023888bkh.39 for ; Tue, 15 Oct 2013 03:02:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=JsotSfmku2FnO4YIE+sUo5O3832Gd5CqeAg79/ryxj8=; b=YhQLuii5wazHWjzGmHyU1R31oMWm3YdYdHqWy7k75QcyoVGwkaUKnpIrgm6sV3pRBP bE9N6YTqe1KMy4Exc9uViZX5PUSLLxfDWYjy6030L48E2NWPZKk0Cj0z0v2Ae+JZ/UIQ J5aq/lecqNW+31bRGllq6VWlBWFJDwsXENhaTufFDSA5jR2UOg16Nm/2P3d8DJ8Vyi+T FCPUPgUqg0Ua5MhWLbPHiPQPKnawmBpGsBf0fcUwGYOywvdvyyzBKFm9zyQIImLyOMbV g+YnRlySW71NafKwemyns1D8M9+G9a1oRUZnbbXswEzcraSxc7rlZLktE0gQgIJeKegx +uyw== X-Gm-Message-State: ALoCoQmSmAdRCxHxfr7J33QQILqWAhTuI8ipiHsKWofZwQC+gleWfpizoD8MBM9rtUF5sFCusc68 X-Received: by 10.204.168.197 with SMTP id v5mr34470708bky.24.1381831345734; Tue, 15 Oct 2013 03:02:25 -0700 (PDT) Received: from fedora-fisso.localnet (static-217-133-170-65.clienti.tiscali.it. [217.133.170.65]) by mx.google.com with ESMTPSA id w9sm43043191bkn.12.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 15 Oct 2013 03:02:24 -0700 (PDT) From: Davide Soldan To: "yocto@yoctoproject.org" Date: Tue, 15 Oct 2013 12:02:20 +0200 Message-ID: <2654026.GvoHhChOvl@fedora-fisso> User-Agent: KMail/4.11.2 (Linux/3.11.3-201.fc19.x86_64; KDE/4.11.2; x86_64; ; ) MIME-Version: 1.0 Subject: preserving file owners in do_package X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Oct 2013 10:02:29 -0000 Content-Type: multipart/alternative; boundary="nextPart2923178.HTJDXMPFEL" Content-Transfer-Encoding: 7Bit --nextPart2923178.HTJDXMPFEL Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Hi to all, in my recipe I want to change owner and permission of a file, so I wrote: do_install() { ls -la ${D}/opt/user chown -R user ${D}/opt/user chgrp -R user ${D}/opt/user ls -la ${D}/opt/user chmod 754 ${D}/opt/user/user.sh ls -la ${D}/opt/user } the output of ls commands is: drwxr-xr-x 8 root root 4096 Oct 15 11:13 . drwxr-xr-x 3 root root 4096 Oct 15 11:13 .. -rw-r--r-- 1 *root root* 55753 Aug 2 08:48 user.sh drwxr-xr-x 8 user user 4096 Oct 15 11:13 . drwxr-xr-x 3 root root 4096 Oct 15 11:13 .. -rw-r--r-- 1 *user user* 55753 Aug 2 08:48 user.sh drwxr-xr-x 8 user user 4096 Oct 15 11:13 . drwxr-xr-x 3 root root 4096 Oct 15 11:13 .. *-rwxr-xr--* 1 user user 55753 Aug 2 08:48 user.sh So the change of owner and permission works fine in do_install phase. Opening the final rootfs tarball, however, the file user.sh has still 754 permission but root as owner...so do_package doesn't preserve owner change done in do_install? Or maybe I'm doing something wrong in changing file owner? Any ideas? Thanks to all! --nextPart2923178.HTJDXMPFEL Content-Transfer-Encoding: 7Bit Content-Type: text/html; charset="us-ascii"

Hi to all,

in my recipe I want to change owner and permission of a file, so I wrote:

 

do_install() {

ls -la ${D}/opt/user

chown -R user ${D}/opt/user

chgrp -R user ${D}/opt/user

ls -la ${D}/opt/user

chmod 754 ${D}/opt/user/user.sh

ls -la ${D}/opt/user

}

 

the output of ls commands is:

 

drwxr-xr-x 8 root root 4096 Oct 15 11:13 .

drwxr-xr-x 3 root root 4096 Oct 15 11:13 ..

-rw-r--r-- 1 root root 55753 Aug 2 08:48 user.sh

 

drwxr-xr-x 8 user user 4096 Oct 15 11:13 .

drwxr-xr-x 3 root root 4096 Oct 15 11:13 ..

-rw-r--r-- 1 user user 55753 Aug 2 08:48 user.sh

 

drwxr-xr-x 8 user user 4096 Oct 15 11:13 .

drwxr-xr-x 3 root root 4096 Oct 15 11:13 ..

-rwxr-xr-- 1 user user 55753 Aug 2 08:48 user.sh

 

So the change of owner and permission works fine in do_install phase.

Opening the final rootfs tarball, however, the file user.sh has still 754 permission but root as owner...so do_package doesn't preserve owner change done in do_install? Or maybe I'm doing something wrong in changing file owner? Any ideas?

Thanks to all!

--nextPart2923178.HTJDXMPFEL--