[SOLVED] No access to terminal files

Status
Not open for further replies.
G

Guest

Guest
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.
 
Solution
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...

wildwell

Distinguished
Sep 19, 2009
658
0
19,060
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!
 
Solution
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.
 

wildwell

Distinguished
Sep 19, 2009
658
0
19,060


.... 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. ;)
 
Status
Not open for further replies.