Re: Change folder/file ownership
Re: Change folder/file ownership
- Subject: Re: Change folder/file ownership
- From: Laine Lee <email@hidden>
- Date: Tue, 17 Dec 2002 13:43:36 -0600
http://www.txdirect.net/users/llee/applescript/uptowner.html
Have a look at Uptowner. The source is included. If you use the -R option
where Uptowner doesn't, you can probably manage it pretty quickly.
Uptowner is built for safety rather than power. If Uptowner's target is a
folder, it will simply temporarily change the owner for the folder, not its
nested contents. If the target is a file, then it temporarily changes the
owner for the file as well the file's enclosing folder, so you can trash the
target file if you want to.
The constructs contained in the Uptowner Applescript will also provide you
with examples of how to store your user's name and password in variables and
to set your target for the chown command.
The Folder Actions examples included with 10.2 should set you straight on
the rest. It seems funny to me that the scripts in the Folder Actions folder
contain the scripts that manage script attachment and the scripts in the
Folder Actions Scripts folder contain the example scripts that get attached.
I'd expect it to be the other way around.
Yours 'til it is,
Laine
On 12/17/02 11:59 AM, "Henrik Boes" <email@hidden> wrote:
>
Hello,
>
>
I have looked through the archives and found things that tangentially
>
address this issue, but have not found something that's spot on. My
>
apologies if I overlooked something ... and my apologies also for
>
posting a question that I could answer myself after looking over a
>
beefy AppleScript book. To be honest, I do not have the time to do that
>
at the moment and need an answer asap ...
>
>
Here's the situation I'm trying to address: people are saving data to a
>
file server (OS X Server 10.2.2) that also acts as the CD burning
>
computer for data to be handed to vendors etc. (it's a small design
>
shop). The data is saved with the user and group info of the network
>
user, meaning the network admin account logging into the server has no
>
access to the files and folders and hence cannot burn CDs.
>
>
What I'd like to do is set up an AppleScript, linked to a folder via
>
Folder Actions, that changes the ownership of all items (folders and
>
items included therein) added to the folder to the network admin. Group
>
ownership should stay the same, to allow network users access to the
>
files after the process is complete.
>
>
I simply do not know the correct syntax for this procedure. How, for
>
example, do you make the necessary "sudo chown"-like commands and have
>
the admin password needed to authorize the change be entered
>
automatically?
>
>
Any help would be appreciated. Thanks for your time.
>
>
Henrik Boes
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
--
Laine Lee
email@hidden
http://www.txdirect.net/users/llee
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.