Re: Change file rights
Re: Change file rights
- Subject: Re: Change file rights
- From: Graff <email@hidden>
- Date: Sat, 12 Jun 2004 16:38:56 -0400
On Jun 12, 2004, at 2:16 PM, Alatorre, Michael wrote:
do shell script "sudo chmod o+w /private/etc/httpd/somefile.txt"
This adds (+) owner (o) write (w) permission to the filepath
Just curious, under OS X, aren't the who symbols u = user, g = group,
o =
other instead of o = owner, g = group, w = world? Doesn't the above do
shell
script then give everyone write permissions to
/private/etc/httpd/somefile.txt?
Yes. Here's the relevant portion of the chmod manfile:
u The user permission bits in the original mode of the file.
g The group permission bits in the original mode of the file.
o The other permission bits in the original mode of the file.
However if you want to add read and write for the user, group, and
other then just do this:
do shell script "chmod +rw " & quoted form of posix path of theFile
This simply adds read and write privs for all of the classes.
I would still personally prefer to do this directly through AppleScript:
set owner privileges of theFile to read write
set group privileges of theFile to read write
set everyones privileges of theFile to read write
- Ken
_______________________________________________
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.