Discussion:
[9fans] System patch failed: Permission denied
(too old to reply)
Strake
2012-04-21 03:26:34 UTC
Permalink
Hello. I wish to patch my system, but can't:

% who
glenda
% cat /adm/users | grep glenda
glenda:glenda:glenda:
sys:sys::glenda
% ape/patch < /usr/glenda/nix.diff
patching file 'float.h'
patch: **** can't rename '/tmp/...' to 'float.h': Permission denied
%

What?

I tried other diffs; same grief. How can I do so? I briefly searched
the 9fans archive, but found no such method, though I'm a 9novice so
might have just missed it.

Thanks.

Cheers,
strake
David du Colombier
2012-04-21 07:15:12 UTC
Permalink
If this is the patch I'm thinking about, try:

% ape/patch -p1 < /usr/glenda/nix.diff
--
David du Colombier
Strake
2012-04-21 13:43:29 UTC
Permalink
Post by David du Colombier
% ape/patch -p1 < /usr/glenda/nix.diff
Thanks. It worked.

I thought that patch would use full path if -p not given, but it seems
otherwise.

Cheers,
strake
David du Colombier
2012-04-21 14:19:55 UTC
Permalink
Post by Strake
I thought that patch would use full path if -p not given,
but it seems otherwise.
No. Without -p, patch retains only the last element in the path.
There are new files in your patch, but you can't usually create
files into /. That's why it failed.

Patch is a bit confusing because it hasn't showed you the
first error message, which was:

mounted directory forbids creation
--
David du Colombier
Loading...