Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgin needs root permission on arm64?



On Sun, 21 Jul 2024 12:25:42 +1200
Lloyd Parkes <lloyd%must-have-coffee.gen.nz@localhost> wrote:

> On Sat, 2024-07-20 at 19:11 -0500, Ted Spradley wrote:
> > I just stumbled on something that surprised me. On amd64 I can do
> > 'pkgin list' or 'pkgin search' as my ordinary user, but on OrangePi
> > 5+
> > it requires root permission, and the error message is not very
> > helpful.
> > Is there something I'm not understanding?
> 
> It sounds like a file permission problem on the SQLite database that
> pkgin uses. Compare the output from "ls -la /var/db/pkgin/" on the two
> systems. 

set$ ls -la /var/db/pkgin/                 
total 41690
drwxr-xr-x   3 root  wheel       512 Jul  9 19:12 .
drwxr-xr-x  12 root  wheel       512 Jul 22 09:17 ..
drwxr-xr-x   2 root  wheel      5632 Jul  9 19:12 cache
-rw-r--r--   1 root  wheel    235565 Jul  9 19:12 pkg_install-err.log
-rw-r--r--   1 root  wheel  40546304 Jul  9 19:12 pkgin.db
-rw-r--r--   1 root  wheel   1786549 Feb 13 18:15 sql.log
set$ ssh t@10.0.0.120 ls -la /var/db/pkgin/
X11 forwarding request failed on channel 0
total 77776
drwxrwxr-x  3 root  wheel       512 Jul 20 18:47 .
drwxr-xr-x  9 root  wheel       512 Jul 22 10:18 ..
drwxr-xr-x  2 root  wheel      2560 Jul  5 16:40 cache
-rw-r--r--  1 root  wheel      4930 Jul  5 16:40 pkg_install-err.log
-rw-r--r--  1 root  wheel  39698432 Jul 20 18:47 pkgin.db
-rw-rw-r--  1 t     wheel       775 Jul 20 19:16 sql.log
set$ 

The differences are group write permission on the directory and I'm the
owner of sql.log on the system that requires root permission. That is,
the permissions are less restrictive on the system that requires root.

I'm guessing maybe the first thing I did with pkgin on that system did
not use root, so it created the sql.log owned by me, and now needs root
to write to it? Nah, that doesn't make sense.

> Also double check that you are running the same version of pkgin on
> both systems with "pkg_info pkgin" because there might just be a bug in
> pkgin.

pkgin-23.8.1nb3 on both.

> Ng? mihi,
> Lloyd

-- 
Ted Spradley <tsprad%talent-free-studios.com@localhost>


Home | Main Index | Thread Index | Old Index