Lauching Files at startup with root priviledges

Hello all,

This is my first post to the forum. I’ve tried to research, but do not have a solution.

I have a program (4D server) running on OSX. It is set up to publish a website on port 80 (the standard web port). Unfortunately, OSX does not allow an application to publish on a port less than 1000 unless it is run as the root user.

When the computer boots up, I want it to open a specific database with 4D server with root priviledges without me having to type in a administrator password. I want it to be all automatic.

To open the database I use:
open file “Macintosh HD:Data:4D database” using application file “Macintosh HD::Applications:4th Dimension 2003:4D Server”

I have tried the program Platypus to wrap it, but I haven’t gotten it to work, and if I did, I would still need to enter an administrator password.

I thought about doing a sudo command from terminal, but I’m not sure how to script that, and I don’t know how to ‘sudo’ to make a specific datbase open with a specific applicaton.

Any help would be appreciated.

Thanks,
dave

I’m not sure, but maybe it is good enough if you launch the app as root. Then it should be able to open anything it wishes…

do shell script "open /path/to/4d.app" password ¬
		"yourpassword" with administrator privileges

You opened 4D with root privileges?
Then try opening the database with 4D using your code.

If this doesn’t work, you may wait for the *nix guys to answer your question :wink:

Thanks jj, I will give it a shot. The only problem I see is that I would like a specific database to open with a specific 4D server. Ussually that is done by draggin one icon on top of another. I’m not sure how to simulate that from the terminal with a line command.

dave