Solved

how to add bash script and plist file to execute in OS X

Posted on 2012-04-05
2
629 Views
Last Modified: 2012-04-09
hi,

i am trying to follow the post on http://www.practiceofcode.com/post/15543512691/disable-greylisting-under-lion-server

to add a bash script and plist file to execute it, however I don't know the specifics of what program to use to actually add the scripts to osx, as well as how to give root:wheel access to the plist file.

how does one go about creating a bash script on osx, and saving it to the disk.  then how, specifically, would i add the plist file and change its permissions?

thank you.
0
Comment
Question by:kaplancomputers
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Accepted Solution

by:
maximus5328 earned 500 total points
ID: 37815921
You can use TextEdit - in your Applications - to create the script and plist. Just make sure you switch to plain text: Format menu > Make Plain Text.
To set the owner and change permissions you should use Terminal in your Utilities folder.

Easy steps to set the owner on a file:
1. Open Terminal and type (without quotes but with the space at the end):
"chown root:wheel "
2. Drag the file from the Finder to Terminal - the path to the file should be added at the end of the command.
3. Hit Return

To change permissions on a file:
1. Open Terminal and type (without quotes but with the space at the end):
"chmod 755 "
2. Drag the file from the Finder to Terminal - the path to the file should be added at the end of the command.
3. Hit Return

To check the effective owner and permissions on a file:
1. Open Terminal and type (without quotes but with the space at the end):
"ls -lah "
2. Drag the file from the Finder to Terminal - the path to the file should be added at the end of the command.
3. Hit Return
The resulting line will show permissions first then owner, group, file size, modification date, file path.
Permissions 755 should look like "-rwxr-xr-x"
Permissions 644 should look like "-rw-r--r--"
0
 

Author Closing Comment

by:kaplancomputers
ID: 37826259
Perfect, thanks for the explanation!
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The error "There was an error performing the update" occurred on a Mac OS X client workstation running  Symantec AntiVirus for Mac (http://www.symantec.com/business/products/purchasing.jsp?pcid=pcat_security&pvid=825_1) - the Enterprise product vers…
In this article we have discussed about the OS X EI Capitan and how to fix Wi-Fi issue in OS X El Capitan. We have explained how to delete system level preferences and create a new Wi-Fi location to resolve Wi-Fi issue.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question