Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. how to create a clone of directory with changing permissions

how to create a clone of directory with changing permissions

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 593 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Qt Enthusiast
    wrote on last edited by
    #1

    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.txt

    In 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

    jsulmJ 1 Reply Last reply
    0
    • Q Qt Enthusiast

      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.txt

      In 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

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • Q Offline
        Q Offline
        Qt Enthusiast
        wrote on last edited by
        #3

        I have to make the file File.txt as writable

        JonBJ 1 Reply Last reply
        0
        • Q Qt Enthusiast

          I have to make the file File.txt as writable

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @Qt-Enthusiast
          Then either when copying File.txt do 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.

          1 Reply Last reply
          2

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved