Change file permissions with Hazel or AppleScript



Hi Hazel and other gurus - Help!

Recently, I have begun to receive quite a few PDF files that are read only. My Hazel rules won’t work correctly on these files - I assume because Hazel does not have permission to write to the file.

How can I change the file to be read/write by using Hazel or similar? I’ve googled and browsed but haven’t been able to find an answer that I understand!



A few questions to narrow things down:

  1. What is your Hazel rule attempting to do to the PDF file exactly? You mention writing to the file.
  2. Do these files have a read only permission on the file system? Apple support info on setting/checking this can be found online.
  3. Does the PDF itself have any security on it? e.g. copy protection, password protection - should show in the PDF’s properties.


To answer sylumer’s questions:

  1. The Hazel rule aims to rename the file, add a tag and then move it to a designated folder - it renames but fails to complete the next two steps. I assume it cannot add the tag because the file is read only.

  2. Yes - they are read only.

  3. In some cases, the PDF is locked, however I have another Hazel rule (which is the first rule run on any PDF added to the folder in question) which unlocks the PDF.