Page 1 of 1

Copy to shared folder with correct permissions?

PostPosted: Mon Nov 05, 2012 1:28 am
by edalzell
I am working on getting two photostreams into one iPhoto library. Works well except for a permissions problem.

We have 3 accounts on our mac, mine, wife's and Media. iPhoto library is in Media. I have turned on photostream for my and wife's account.

I have a rule to copy the photostream files to /Users/Shared/test folder.

Problem is when Hazel tries to import the photos into iPhoto, it can't open the jpgs - no permission.

I have tried to change the permissions of the 'test' folder to allow the 'media' user to have full permissions, but but each photo copied can't be opened by 'media'.

Suggestions?

Re: Copy to shared folder with correct permissions?

PostPosted: Mon Nov 05, 2012 2:19 am
by edalzell
My current idea is to change the permission via a shell script. This is not working however.

The shell script is 'chmod 755 $1'.

I get this:
Code: Select all
2012-11-04 22:17:08.151 hazelworker[38407] IMG_0396.JPG: Rule Change Permissions matched.
2012-11-04 22:17:08.231 hazelworker[38407] [Error] Shell script failed: Error processing shell script on file /Users/Shared/Photostream Photos - Erin/IMG_0396.JPG.
2012-11-04 22:17:08.232 hazelworker[38407] Shellscript exited with non-successful status code: 1


Help please

Re: Copy to shared folder with correct permissions?

PostPosted: Mon Nov 05, 2012 2:29 pm
by Mr_Noodle
I'm guessing you don't have permissions to change the permissions. You should look into setting up a group and setting the group permissions appropriately.

Re: Copy to shared folder with correct permissions?

PostPosted: Mon Nov 05, 2012 2:33 pm
by edalzell
Mr_Noodle wrote:I'm guessing you don't have permissions to change the permissions. You should look into setting up a group and setting the group permissions appropriately.


I can run the command from the terminal with no problems though from my user. What user does Hazel run under?

Re: Copy to shared folder with correct permissions?

PostPosted: Mon Nov 05, 2012 2:34 pm
by Mr_Noodle
Oh wait, looking at it again, you need to put quotes around $1 as the path in question has a space in it. Give that a shot and report back.

Re: Copy to shared folder with correct permissions?

PostPosted: Mon Nov 05, 2012 2:38 pm
by edalzell
Mr_Noodle wrote:Oh wait, looking at it again, you need to put quotes around $1 as the path in question has a space in it. Give that a shot and report back.


I bet that's the culprit. I'll try again when I get home tonight, thanks.

A suggestion: mention that (that you have to quote it) right in the rule creation somewhere. Might reduce support questions from dummies like me!

Re: Copy to shared folder with correct permissions?

PostPosted: Mon Nov 05, 2012 4:40 pm
by Mr_Noodle
Under consideration though there are always edge cases so it's hard to make blanket statements. Also, I'd have to research how it's done across all the other scripting languages for consistency's sake.