how to create a clone of directory with changing permissions
-
how to create a clone of the directory with changing permissions
I have a directory Dir and have some subdirectories
ls Dir
ls -al Dir
A
B
C
File.txtIn this case File1 has only read permissions
now I have to create a clone of Dir where it has same sub directories but only where directory has write permissions
-
how to create a clone of the directory with changing permissions
I have a directory Dir and have some subdirectories
ls Dir
ls -al Dir
A
B
C
File.txtIn this case File1 has only read permissions
now I have to create a clone of Dir where it has same sub directories but only where directory has write permissions
@Qt-Enthusiast https://forum.qt.io/topic/59245/is-there-any-api-to-recursively-copy-a-directory-and-all-it-s-sub-dirs-and-files
How to check for access rights was already explained here https://forum.qt.io/topic/96054/how-to-check-for-a-file-directory-if-the-file-has-read-only-permissions -
I have to make the file File.txt as writable
-
I have to make the file File.txt as writable
@Qt-Enthusiast
Then either when copyingFile.txtdo not copy its read-only-ness permission, or after a complete copy which has set it read-only go back and make it writeable after all.