The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   Applications (http://hintsforums.macworld.com/forumdisplay.php?f=5)
-   -   "appropriate privileges" (http://hintsforums.macworld.com/showthread.php?t=89134)

dougbraz 04-29-2008 05:14 PM

"appropriate privileges"
 
I am trying to open a file - leao2007javamacv1.1command and when I click on it I get the message "the file....could not be executed because you do not have appropriate access privileges. To view or change access privileges, select the file in the Finder and choose File > Get Info".
In Get info, at the bottom, it says I can read and write to this file so what else is there to change? I have java J2SE 5.0 running, so am up to date - presumably.
Am running MAC OSX 10.5.2 on a MacBook 2Ghz Intel with 1Gb memory.

Any tips?:confused:

tlarkin 04-29-2008 05:23 PM

you are running an automated shell script, you need executable rights. What does this file do?

dougbraz 04-29-2008 05:25 PM

It opens an income tax program (via terminal I think..)

tlarkin 04-29-2008 05:29 PM

why would you need that?

You can already do that via terminal by doing this:

Code:

open -a "taxprogram.app"
Does it run some sort of automated thing or something with the .command?

It is some sort of java app or java script?

dougbraz 04-29-2008 05:40 PM

You're losing me here.
I have no idea what it runs. It ends up being a table for monthly income tax and deductions (Brazilian Income tax - not US). Are you saying that I should enter those very words that you wrote in terminal, or the name of the program?
sorry, I'm not so tecchie, more a photoshop buff..:D

tlarkin 04-29-2008 05:43 PM

No, I am just weary of why you would run that, and it seems possible it could be malicious and do harm to your system. Which is why I haven't told you how to modify the permissions yet.

I will tell you, but run this at your own risk, and you must be an admin to accomplish this

Code:

sudo chmod 755 /path/to/command
you can just drag and drop the file in terminal after the 755 and it will add the path in automatically. This will make it read/write/execute for owner and read/execute for everyone else.

Mikey-San 04-29-2008 05:56 PM

http://www.receita.fazenda.gov.br/Pe...eao2007mac.htm

Is this where you downloaded the file?

dougbraz 04-29-2008 05:58 PM

It's an official program from the govt - I live in Brazil, actually and it's income tax time now (due Wed nite).
I tried what you said but it asked for a password and I couldn't type anything...presumably that would be my administrator / login pw, right?

tlarkin 04-29-2008 05:59 PM

yeah it will ask for the admin password to change permission to do so. You must be the admin to run that command.

dougbraz 04-29-2008 06:01 PM

It IS a java based program - they say you need at least java version 1.4.2

dougbraz 04-29-2008 06:04 PM

I AM the admin - the only user!

dougbraz 04-29-2008 06:05 PM

Mikey san -
It's
http://www.receita.fazenda.gov.br/Pe...eao2007mac.htm

tlarkin 04-29-2008 06:07 PM

Quote:

Originally Posted by dougbraz (Post 467104)
I AM the admin - the only user!

then type in your password for your admin account when you run the chmod command. Then you should be able to execute it.

dougbraz 04-29-2008 06:16 PM

aaaaaaaaaaaaaaaaaargh!

Last login: Tue Apr 29 19:12:13 on ttys000
doug-stewarts-macbook:~ dougbraz$ sudo chmod 755 /path/to/command/Users/dougbraz/Desktop/LEAO2007Javamacv1.1.command
chmod: /path/to/command/Users/dougbraz/Desktop/LEAO2007Javamacv1.1.command: No such file or directory
doug-stewarts-macbook:~ dougbraz$

tlarkin 04-29-2008 06:25 PM

oh man I am sorry

I mean drop the /path/to/command and put in the actual path

which would be

sudo chmod 755 /Users/dougbraz/Desktop/LEAO2007Javamacv1.1.command

trevor 04-29-2008 06:27 PM

dougbraz, you don't want to explicitly type
/path/to/command


That's a placeholder for the path to the command. You want to type exactly

sudo chmod 755 /Users/dougbraz/Desktop/LEAO2007Javamacv1.1.command

Trevor



Edit: D'oh! Beaten to the punch...

dougbraz 04-29-2008 06:29 PM

Don't think I'm not appreciating your great help, but I got nothing, nada , zip

Last login: Tue Apr 29 19:27:24 on ttys000
doug-stewarts-macbook:~ dougbraz$ sudo chmod 755 /Users/dougbraz/Downloads/LEAO2007Javamacv1-1.1.command
doug-stewarts-macbook:~ dougbraz$

AFter I moved the file back to the downloads folder..

Man this is frustrating - I DO appreciate your time..

dougbraz 04-29-2008 06:31 PM

trevor -

Last login: Tue Apr 29 19:27:50 on ttys000
doug-stewarts-macbook:~ dougbraz$ sudo chmod 755 /Users/dougbraz/Desktop/LEAO2007Javamacv1.1.command
doug-stewarts-macbook:~ dougbraz$

nope...also

trevor 04-29-2008 06:34 PM

Quote:

doug-stewarts-macbook:~ dougbraz$ sudo chmod 755 /Users/dougbraz/Desktop/LEAO2007Javamacv1.1.command
doug-stewarts-macbook:~ dougbraz$
No, that means that the command completed successfully. On the command line, you either get an error, or if you get no other response the command was successful.

So, this .command file should now be considered executable in Unix (not that I'm convinced that .command files require that, since they are executed in the GUI).

You can verify this with
ls -l /Users/dougbraz/Desktop/LEAO2007Javamacv1.1.command

You should see permissions for this file of
-rwxr-xr-x

Those three x's above mean that it is executable (on the command line) by the user owner, the group owner, and others.

Trevor

dougbraz 04-29-2008 06:36 PM

WOOHOO!!!!!
GReat - thanks a million guys!
It now worked....

BRilliant

tlarkin 04-29-2008 07:24 PM

so adding the executable fixed it?

traveler400 09-22-2009 11:08 AM

Make executable on ANY machine
 
I have written a script that I would like to be able to e-mail to people and have them run WITHOUT them having to run a chmod on the file first. Is this possible???

Thanks,

-A

hayne 09-22-2009 12:10 PM

Quote:

Originally Posted by traveler400 (Post 553873)
I have written a script that I would like to be able to e-mail to people and have them run WITHOUT them having to run a chmod on the file first. Is this possible???

Easiest would be to wrap the (presumably shell) script in an AppleScript and send that.


All times are GMT -5. The time now is 10:27 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.