• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Change file rights
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Change file rights
      • From: Gnarlodious <email@hidden>
References: 
 >Re: Change file rights (From: "Alatorre, Michael" <email@hidden>)

  • Prev by Date: Re: Saving SE dictionaries
  • Next by Date: Re: Delays posting to this list
  • Previous by thread: Re: Change file rights
  • Next by thread: Re: Change file rights
  • Index(es):
    • Date
    • Thread