[Python-ideas] Add shutil.chown(..., recursive=False)

Greg Ewing greg.ewing at canterbury.ac.nz
Tue May 29 02:29:50 EDT 2018

Steven D'Aprano wrote:
> But it doesn't matter: regular users can call chown -R:

Only if you're not actually telling it to change anything.

% ls -l foo.txt
-rw-r--r--  1 greg  users  1 29 May 18:19 foo.txt
% chown greg foo.txt
% chown fred foo.txt
chown: foo.txt: Operation not permitted

So you have to be root in order to do anything *useful*
with it.


More information about the Python-ideas mailing list