Sign in with
Sign up | Sign in
Your question

No access to terminal files

Last response: in Mac Os X
Share
Anonymous
a b 8 Security
August 29, 2012 2:06:53 PM

Hey! I have this problem on my mac where I cannot open .command files, which thus are opened by terminal. It says I don't have the access rights for opening the program, but I am the freaking admin. I open "Archive\Show info", and that also says I have rights to read and write on the file. Please help meh!
Here is the file, trying to open a minecraft_server.jar by the way.
Spoiler
cd ~/Desktop/Minecraft\ Server
java -Xincgc -Xmx2512M -jar CraftBukkit.jar

AND I have checked that the .command file and the .jar file is in the same directory.

More about : access terminal files

a b 8 Security
August 29, 2012 3:34:07 PM

Does the file have the "execute" bit set?
August 29, 2012 6:24:58 PM

Navigate to the files in question using either Terminal or by booting into single user mode.
Use the '-l' flag with the 'ls' command to view complete permissions for the files in question.
Syntax: $ ls -l

After the string of "drwx---" or "-rw-r--r" or similar, you'll see a number followed by a user name (this is the file's owner) followed by the group name. The second through forth characters for each item indicate what level of permissions are associated with the user, and the following three characters after that indicate group permissions. Last set of three characters describe all other user's access.
'-' = no access
'r' = read access
'w' = write access
'x' = executable access

Command 'chown' will change ownership, command 'chmod' will modify privileges. These commands require root access, so you'll need to be in single user mode or use the 'sudo' command with each from Terminal.

Good luck!
Related resources
a b 8 Security
August 29, 2012 7:14:56 PM

Quote:
These commands require root access, so you'll need to be in single user mode or use the 'sudo' command with each from Terminal.
No. The file's owner can change it's permissions; no need for sudo.
August 30, 2012 4:44:26 PM

^^^ You're assuming the OP is the file owner of the files in question. Just because a user has admin access does not mean he's the file owner.
a b 8 Security
August 30, 2012 5:36:42 PM

I am assuming nothing, just telling it like it is.

Actually, If the OP copied the files then he is almost certainly the owner. But it doesn't matter as you specified that the ownership be changed first; sudo is not necessary for chmod under these circumstances.
August 30, 2012 7:14:15 PM

wildwell said:

Command 'chown' will change ownership, command 'chmod' will modify privileges. These commands require root access, so you'll need to be in single user mode or use the 'sudo' command with each from Terminal.


.... although if you're the file creator/owner, root access may not be necessary.
Of course, if you're the file's creator/owner, you shouldn't have a problem reading files the finder doesn't let you change permissions on in the first place. :kaola: 
You can of course, always try to modify file privileges using 'chmod' w/o sudo, just be aware that the system may not let you.

If you're unix competent to follow Ijack's (and mine) nitpicking, then you obviously won't have any problem being able to tell if the system asks you for root access. ;) 
!