04-18-2019 05:20 AM
I have a question on how to propperly install petalinux on a Ubuntu system. I have followed the instructions found in UG1144 petalinux tools reference guide and found that these did not work for me and I would like to know why. If I understand correctly the /opt directory is intended for 3d party software that can be used by all users so I would like to install to that locaiton.
First off, I am able to install petalinux to my home directory (i.e. ~/Petalinux/2018.3) so I know all required packages to build the system are available, this is purely about permissions in /opt.
When trying to install to the sugested directory (i.e. /opt/Petalinux/2018.3) the installer throws an error. The error is quite clear however I presume the instructions in UG1144 should have prevented this. The error is:
ERROR: Access Denied. No access permissions to the directory /opt/pkg/Petalinux/2018.3
UG1144 states that the install directory requres 755 permissions to install and this I have.
$ l /opt/pkg drwxr-xr-x 3 root root 4096 apr 18:11:10 Petalinux/
$ l /opt/pkg/Petalinux
drwxr-xr-x 3 root root 4096 apr 18:11:10 2018.3/
All solutions I found online state just run the installer using sudo, but as UG1144 explicitly states that root privilages are not required to install to me this looks like a dirty workaround.
What is the proper way to fix this? Do the folders in /opt required different users or groups, should the suid/guid for the install script be set or something else?
04-18-2019 09:57 PM
Change to user permissions instead of root over the path (/opt/pkg/petalinux). You can use this command to change that: chown -R <username>:<username> /opt/pkg/petalinux
06-03-2020 08:49 AM