Symfony Installation

I'm trying to use my terminal to set up a file as per the Symfony website suggests and every time I do this

bruce$ mkdir - p lib/vendor

mkdir: lib/vendor: Permission denied

How do I fix this?
brucegustPHP DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

woolmilkporcCommented:
Which is your current directory?

If it's /usr or any other directory you don't have write access  (and if it must be such a directory) then log in as root or use "sudo mkdir ..." If you're authorized.

Otherwise cd to a suitable directory where you have write access.
0
brucegustPHP DeveloperAuthor Commented:
I don't know what my current directory is and I apologize for sounding so ignorant, but I really want to understand this so I can get up and running.

If you would be willing...

The Symfony tutorial has me attempting to create a directory using the following: -p /home/sfprojects/jobeet

What is "p?" What does that stand for and where is it?

I'm assuming it's wise to try and stay consistent with the tutorial, so while I think I understand the "all access" dynamic of "sudo" (superuser do, correct?), should I need that if I'm doing it right?

in other words, if the tutorial is giving me instructions that result in an error on my machine, my first thought is I'm doing something wrong and I don't want to work around it as much as I want to solve it.

That said, here's what I'm working from: http://symfony.com/legacy/doc/jobeet/1_4/en/01?orm=Propel. If you were me, what should I do? There's no mention of "logging in" and I'm all for it, but I want to understand "why" I'm doing it and not just "that" I should do it.

Thanks in advance for your help. I've been googling like a madman and wasn't able to make a lot of progress.
0
woolmilkporcCommented:
Check your current directory by issuing "pwd"

-p means "parents" and instructs mkdir to create the whole path.
In your case with "lib/vendor" mkdir -p ... would create "lib" (if it doesn't exist yet) as well as "lib/vendor". Without -p mkdir would try to create "lib/vendor" and error out if "lib" doesn't yet exist.

As for "mkdir -p /home/sfprojects/jobeet" : You must have write access to "/home" to successfully run this command, If you ("bruce"?) do not have such access you must become "root" or prefix the mkdir command with "sudo" (if authorized).

Check permissions with "ls -l /home" - the first three triplets starting at position 2 indicate the permissions for owner, group and all others, where r=read, w=write and x=execute (or "scan" for directories).
Find owner and group in columns 3 and 4.

I'll have a look at your tutorial, but please give me some time!
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

brucegustPHP DeveloperAuthor Commented:
Here's what I get when I check my current directory using "pwd:"

Bruce-Gusts-iMac:/ bruce$ pwd
/
Bruce-Gusts-iMac:/ bruce$

Not sure what that means or how that translates into where I would actually go to see the physical files. For the last few days, I assumed that "p" meant "personal" and I was looking in "bruce," which I'm assuming is my home directory.

Please don't worry about the tutorial, unless you've got the bandwidth to go through it. Perhaps with your expertise it's no more than a 10 minute perusal, but my biggest challenge is just securing / defining the correct permissions so I can proceed.

Here's what I get when I attempt to look at my permissions:

Bruce-Gusts-iMac:/ bruce$ ls -l/home
ls: illegal option -- /
usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]
Bruce-Gusts-iMac:/ bruce$

Obviously doing something wrong...
0
woolmilkporcCommented:
There is a space between "-l" and "/home"
0
brucegustPHP DeveloperAuthor Commented:
Here's what I get when I do:

Bruce-Gusts-iMac:/ bruce$  ls -l /home
Bruce-Gusts-iMac:/ bruce$
0
woolmilkporcCommented:
So your /home directory is empty, that's why there's nothing to display.
Run "ls -ld /home" to find out the permissions, owner and group. Next, run "id" to find out who you are and which group you're in.

By the way, isn't your tutorial way too old? It's for version 1.x, and the current version is 2.5!

How about this one:  http://symfony.com/doc/current/quick_tour/the_big_picture.html ?
0
brucegustPHP DeveloperAuthor Commented:
You're right, as far as the tutorial. But the project that I've been hired to work on is 1.4 and the guy I report to is hesitant to update right now so we're sticking with the tools they're using in their shop. But good catch!

As far as the next command your recommended, here's what happened:

Bruce-Gusts-iMac:/ bruce$ ls -ld/home
ls: illegal option -- /
usage: ls [-ABCFGHLOPRSTUWabcdefghiklmnopqrstuwx1] [file ...]
Bruce-Gusts-iMac:/ bruce$

I tried some different spacing options, but I'm still blowing it somewhere.
0
woolmilkporcCommented:
There is still a space between "-ld" and "/home"

Alas my day is over now, let's continue tomorrow!
0
brucegustPHP DeveloperAuthor Commented:
Looking forward to it! Until then, I'm doing some research and here's what I'm learning:

Unix is an operating system that's been around since the 60's that consists of three main parts: kernel, shell and the programs. LINUX is an open source clone of UNIX that has just the kernel.

I'm going through a tutorial that's located at http://www.ee.surrey.ac.uk/Teaching/Unix/unix1.html

The command "ls" lists all the files in my current working directory.
"cd" means to change the current directory
"ld" - went looking for this one and found some info at http://linux.about.com/library/cmd/blcmdl1_ld.htm, but couldn't make any sense of it.

As far as "mkdir," I'm learning the "permission denied," or "operation not supported" is not necessarily indicative of a  deficiency in permissions as much as it's a situation where you're trying to do something that's just not allowed.

I did some digging as far as  "home" directory and learned that my "home" directory is my username with a "house" icon displayed to the left (http://support.apple.com/kb/PH7056?viewlocale=en_US&locale=en_US). I also found this piece of info that suggests I shouldn't be attempting to use "home" at all since it's a place holder.

Glad that you're willing to help me make sense of this.
0
woolmilkporcCommented:
"-ld" in our context here is a combination of two flags to the "ls" command.

"-l" means "long", i. e. show additional info, not just file names.
"-d" means "directory", i.e. show the directory entry itself, not its content.
Flags can be combined, so "ls  -ld" is just the same as "ls  -l  -d"

As for mkdir and the error you're getting - what's in your eyes the difference between "a  deficiency in permissions" and "do something that's just not allowed"?
Whether a file system operation is "allowed" or not entirely depends on the "permissions" you have on the particular object.

So please show the result of

ls   -ld   /home

and

id

I strongly assume that your userid does not have write permission on /home, so to successfully create directories under /home you must (in standard Unix) login as "root" or as a user allowed to issue "sudo mkdir ..." (the dots are just placeholders for options/parameters to follow!) Under OS/X the "root" account is not enabled by default, so you should check if your userid is allowed to run sudo:

sudo   -l

If you're asked for a password enter your own password, not the one of an admin user you might know.

What's the output?

Should it turn out that you ("bruce"?) are not allowed to run "sudo mkdir ..." you'll have to log in with a userid having this privilege. If you don't know such an id you'll have to ask the system administrator of the box you're working on.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
brucegustPHP DeveloperAuthor Commented:
woolmilkporc!

Morning!

Since our last exchange, I was able to get my directory successfully set up. I understand the difference between the "home" directory and the "home" folder I was attempting to set up and in the end I simply removed the first "/" in my mkdir command and we were cooking with grease after that.

I want to respect your time, so I'm going to award you the points for this question and I've got a few more out at these URLs. Look forward to hearing back from you!

http://www.experts-exchange.com/OS/Unix/Q_28477883.html
http://www.experts-exchange.com/OS/Unix/Q_28477885.html
http://www.experts-exchange.com/OS/Unix/Q_28477889.html
0
brucegustPHP DeveloperAuthor Commented:
Excellent
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.