Skip to content

Commit 515776d

Browse files
bpo-143511: clarify sys.remote_exec file permission requirements
1 parent 1ffb2f6 commit 515776d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Doc/howto/remote_debugging.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,19 @@ Note that accessing another process's memory on Windows typically requires
320320
appropriate privileges - either administrative access or the ``SeDebugPrivilege``
321321
privilege granted to the debugging process.
322322

323+
.. important::
324+
325+
The Python process being attached to must itself have permission to
326+
read the injected script file. Running the debugging tool with elevated
327+
privileges (for example, using ``sudo`` or Administrator) is not sufficient
328+
if the target process cannot access the file path provided to
329+
``sys.remote_exec()``.
330+
331+
In practice, this means the injected ``.py`` file must be readable by the
332+
user account under which the target Python process is running.
333+
Otherwise, the target process may raise ``PermissionError``.
334+
335+
323336

324337
Reading _Py_DebugOffsets
325338
========================

0 commit comments

Comments
 (0)