No access to terminal files

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.
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.
6 answers Last reply
More about access terminal files
  1. Does the file have the "execute" bit set?
  2. 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!
  3. 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.
  4. ^^^ 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.
  5. 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.
  6. 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. ;)
Ask a new question

Read More

Security Terminal Command Prompt Mac OS X