/usr/local should be present already. I would start by checking
Why bother checking ? mkdir will simply fail if it already exists.
/usr/local should be present already. I would start by checking
Why bother checking ? mkdir will simply fail if it already exists.
To gain more understanding of what is going on. Finder seems to give mixed messages about the availability of /usr/local/bin. It might also be a permissions related issue for example.
Not if you copy/paste my commands in integrality with sudo.
You do like to argue though.
Eh, /usr/local looks like this: drwxrwxr-x
Meaning you should not need to use sudo, if you do, then perhaps the OP is not logged in as admin, in which case he can not use sudo anyway.
See how that relates to permissions?
Mine doesn't:Eh, /usr/local looks like this: drwxrwxr-x
ls -ld /usr/local
[B]drwxr-xr-x 6 root wheel 204 Dec 28 16:25 /usr/local
[/B]
Mine doesn't:
YMMV. Which I believe was a point made earlier in the thread: it's not a standard directory, it's not created by the OS install, so its existence, permissions, and ownership may vary.Code:ls -ld /usr/local [B]drwxr-xr-x 6 root wheel 204 Dec 28 16:25 /usr/local [/B]
I'm having some issues with OS X Lion and the usr/local/bin folder. Essentially it's not there and I keep getting permission denied errors when I try to create it in terminal.
There is a big difference between /usr/local/bin and usr/local/bin. The leading slash is crucial.When I try to create it in a finder window it says the name is already taken. BUT, when I use the Go function and type in usr/local/bin it says the directory doesn't exist!
The red-hilited directory names are not identical. The first doesn't have a leading slash. The second does.I'm trying to install blueutil on both machines and until I get the usr/local/bin folder accessible on this machine the install keeps failing saying the "directory /usr/local/bin does not exit (1) "
ls -lde /usr /usr/local ; id
So? It's even more restrictive.
Which kind of defeats your earlier argument about my post.![]()
Again, you just like to argue for arguments sake. Just drop it.
The default is an empty /usr/local
it's not a standard directory, it's not created by the OS install
Why do you keep being wrong about this ? I'm not the only stating one the obvious :
The default is no /usr/local, not an empty one. As such, the brute force method is best when broken installers fail to create it. No need to go all "nutty" trying to figure out stuff.
/usr/local IS installed by default, but is empty.
/usr/local IS installed by default, but is empty.
no command-line can be written that is guaranteed to work in all circumstances.
$ mkdir local
$ chmod 000 local
$ ls -ald local
d--------- 2 user group 4096 Feb 8 15:21 local/
$ mkdir local/bin
mkdir: cannot create directory `local/bin': Permission denied
$ sudo mkdir local/bin
$ ls -ald local/bin
ls: cannot access local/bin: Permission denied
$ sudo ls -ald local/bin
drwxr-xr-x 2 root root 4096 Feb 8 15:21 local/bin
$ sudo mkdir -p /usr/local/bin
$ sudo mkdir -p -m 775 /usr/local/bin
True, as far as it goes.root doesn't give a crap about ACLs/permissions :
True, as far as it goes.So technically, a command line can be guaranteed to work when it comes to mkdir and when talking about permissions/ACLs.(of course, I make no guarantees if we're talking about NFS volumes for which the root= option is not set for our particular client).
True, as far as it goes.Unless you've been naughty with the /etc/sudoers file to make mkdir run as an unpriviledge user, under OS X, a user typing "sudo mkdir" should run as root and bypass any permission/ACL problems.
That would only solve the user's problem if the logged-in userid is a member of the group assigned to the dir. Again, we don't know if the userid is in that group or not, until we get the ouput that shows otherwise.There's also the m switch that could make the dir writeable immediately for the group, without messing with the umask of root :
Code:$ sudo mkdir -p -m 775 /usr/local/bin
Found this thread looking for something similar, I have a clean install of Snow Leopard and am getting into development using XCode.
I'm advised that /usr/local is the most standard place to put 3rd-party code/libs for development, is that right?
I found/usr existed but not /usr/local, I created it but I'm getting sick of having to sudo everything. Can I make /usr/local act like a regular dir? Or is the fact it's protected a sign I should be putting code files elsewhere?
Is there a way I can make /usr/local not require admin permissions for modification?
ls -lde /usr/local ; id
I'm doing C++ dev using cross-platform libraries so I imagine the Linux/Unix way is more appropriate since it's also targeted at Linux developers.
Is there a way I can make /usr/local not require admin permissions for modification?
ls -lde /usr/local ; id
drwxr-xr-x 3 root wheel 102 6 Apr 16:17 /usr/local
uid=501(MY-NAME) gid=20(staff) groups=20(staff),204(_developer),100(_lpoperator),98(_lpadmin),81(_appserveradm),80(admin),79(_appserverusr),61(localaccounts),12(everyone),402(com.apple.sharepoint.group.1),401(com.apple.access_screensharing)
Code:ls -lde /usr/local ; id drwxr-xr-x 3 root wheel 102 6 Apr 16:17 /usr/local uid=501(MY-NAME) gid=20(staff) groups=20(staff),204(_developer),100(_lpoperator),98(_lpadmin),81(_appserveradm),80(admin),79(_appserverusr),61(localaccounts),12(everyone),402(com.apple.sharepoint.group.1),401(com.apple.access_screensharing)
I replace my actual username (uid 501) with MY-NAME, otherwise this is what I received. So I think I want to grant all permissions to MY-NAME on /usr/local?
sudo chown MY-NAME /usr/local
Non-hidden to what?Is it also possible to make it non-hidden?