aurto icon indicating copy to clipboard operation
aurto copied to clipboard

update-aurto service fails with "Permission denied", but manually removing and re-adding packages works

Open BrianAllred opened this issue 2 years ago • 3 comments

The error reads cannot create directory ‘/run/user/1000’: Permission denied, however I was able to remove and re-add packages manually with no issue.

I fixed the error by making /run/user writable by all (chmod 777), but I feel like that's not a good or safe solution, since original perms were 755.

aurto version 12.1 aurutils version 10b

BrianAllred avatar Jul 18 '22 23:07 BrianAllred

I would expect this directory, if it's being created during update, to be owned by the aurto user (the one that ran aurto init). So for example, aurto user in /usr/lib/aurto/user "alex" is uid=1000 so can access this directory even with permissions 700.

Can you check your /usr/lib/aurto/user?

alexheretic avatar Jul 20 '22 07:07 alexheretic

I had the same issue. I think it's actually an aurutils problem. It used to store temporary files in a different location, but an update was released recently that moved the temporary storage location to $XDG_RUNTIME_DIR, which points to /run/user/$UID by default. Unfortunately, if you're not currently logged in, or you're logging in some way that doesn't use systemd-logind (i.e. ssh configured with UsePAM no), then that folder doesn't exist.

I enabled user lingering as a workaround, which causes systemd to create the /run/user/$UID folder on boot and leaves it there whether you're logged in or not: sudo loginctl enable-linger USERNAME (where USERNAME is the username in /usr/lib/aurto/user). That seems to have fixed the issue for me.

emberquill avatar Jul 24 '22 02:07 emberquill

https://github.com/AladW/aurutils/commit/ef9944fc9686aeb40def92bec649f0703d4d7677

AladW avatar Aug 20 '22 11:08 AladW

Made its way into v11: https://github.com/AladW/aurutils/releases/tag/11

AladW avatar Feb 03 '23 22:02 AladW

Made its way into v11: https://github.com/AladW/aurutils/releases/tag/11

That's great I've been waiting for this cheers! I think we can close this issue then, it should disappear once aurutils is updated.

alexheretic avatar Feb 04 '23 02:02 alexheretic