0

I recently updated my drupal files from another server.

There are about 50k files.

I need to change the permissions on the files to 644

When I run:

find . type f -exec chmod 644 {} \;

From with in the files dir.

I get the following output:

chmod: cannot access ./file1.jpg No such file or directory
chmod: cannot access ./file2.jpg No such file or directory
chmod: cannot access ./file3.jpg No such file or directory
chmod: cannot access ./file4.jpg No such file or directory

Any idea why this is happening?

Those files should not exist, they may have been there before the move but i am not sure.

1 Answers1

1

I suggest:

find . type f -print0 | xargs -0 chmod 644

This command will execute chmod with lots of files for each iteration, and won't be impacted if the filenames have special caracters.