Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Linux
  3. [Help] Bulk chmod when migrating from NTFS

[Help] Bulk chmod when migrating from NTFS

Scheduled Pinned Locked Moved Linux
7 Posts 7 Posters 0 Views
  • 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.
  • A This user is from outside of this forum
    A This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #1

    At long last I'm finally switching operating system for my gaming PC. I have a lot of photos and such saved that have been moved from an NTFS drive. Is there any tool out there to help me fix the permissions of these files according to file type in bulk?

    shadow@lemmy.caS J P F X 5 Replies Last reply
    0
    • System shared this topic on
    • A [email protected]

      At long last I'm finally switching operating system for my gaming PC. I have a lot of photos and such saved that have been moved from an NTFS drive. Is there any tool out there to help me fix the permissions of these files according to file type in bulk?

      shadow@lemmy.caS This user is from outside of this forum
      shadow@lemmy.caS This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #2

      Chmod works recursively.

      What modes exactly are you trying to set? Why do you need different perms based on the file type?

      1 Reply Last reply
      0
      • A [email protected]

        At long last I'm finally switching operating system for my gaming PC. I have a lot of photos and such saved that have been moved from an NTFS drive. Is there any tool out there to help me fix the permissions of these files according to file type in bulk?

        J This user is from outside of this forum
        J This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #3

        chmod -R [mode] /dir/path

        1 Reply Last reply
        0
        • A [email protected]

          At long last I'm finally switching operating system for my gaming PC. I have a lot of photos and such saved that have been moved from an NTFS drive. Is there any tool out there to help me fix the permissions of these files according to file type in bulk?

          P This user is from outside of this forum
          P This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #4

          If you need finer control than recursive chmod (see other replies), you can also use find to match precisely which files/folders you want and use the -exec parameter to run chmod on those

          S 1 Reply Last reply
          0
          • P [email protected]

            If you need finer control than recursive chmod (see other replies), you can also use find to match precisely which files/folders you want and use the -exec parameter to run chmod on those

            S This user is from outside of this forum
            S This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #5

            I wanted to write the same thing. E.g., you can run this in bash to set the permissions for all .conf files to 600:

            find . -iname "*.conf" -exec chmod 600 {} \;
            
            1 Reply Last reply
            0
            • A [email protected]

              At long last I'm finally switching operating system for my gaming PC. I have a lot of photos and such saved that have been moved from an NTFS drive. Is there any tool out there to help me fix the permissions of these files according to file type in bulk?

              F This user is from outside of this forum
              F This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #6

              Your things may be owned by root and have unusual permissions.

              So, to make your NTFS drive be owned by your user and group and to set the permissions you can:

              # Change owner to user:user
              sudo chown -R username:group your_directory
              
              # Change permissions to default (typically 755 for directories and 644 for files)
              
              # For directories
              find your_directory -type d -exec chmod 755 {} \;
              
               #files
              find your_directory -type f -exec chmod 644 {} \;
              
              1 Reply Last reply
              0
              • A [email protected]

                At long last I'm finally switching operating system for my gaming PC. I have a lot of photos and such saved that have been moved from an NTFS drive. Is there any tool out there to help me fix the permissions of these files according to file type in bulk?

                X This user is from outside of this forum
                X This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #7

                Not like you need another utility to do this, but I highly recommend you checkout fd. It's badass;

                fd -e jpg -e png -e webp -x chmod newuser:newuser

                1 Reply Last reply
                0
                • System shared this topic on
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups