V
V
Vlad Nastawshev2021-02-07 16:03:57
Python
Vlad Nastawshev, 2021-02-07 16:03:57

Copying Permissions in Python?

def clicked2():
lbl.configure(shutil.copytree(txt1.get(), txt2.get(), symlinks=False, ignore=None))

btn7 = Button(window, text="Start Copy", command=clicked2 )
btn7.grid(column=0, row=3)

------------------------------------- ------------
When copying a directory with files, everything is copied, both the contents and the files themselves, but the permissions are not copied.
For example, I copied a directory and it contained a folder with a security restriction (that it can only be read but not edited by everyone except the admin). But the copy did not retain this limitation. I tried to do it through copymode but it didn’t work (apparently I didn’t understand how)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Simakin, 2021-02-07
@Vadessa

Re-set rights

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question