mkdir permissson denied [Solved]

Problems with the Linux version of XAMPP, questions, comments, and anything related.

mkdir permissson denied [Solved]

Postby PhaseMaster » 05. December 2011 21:09

Hello,

My OS is Ubuntu 11. I am trying to install XAMPP 1.7.7.

I entered “su,” my user name, and my password at the command line. This procedure worked as expected. Then I entered the following command:

Code: Select all
tar xvfz xampp-linux-1.7.7.tar.gz -C /opt


The console put out many lines of text, with a frequent error message of:

Code: Select all
tar: lampp: Cannot mkdir: Permission denied


This refers to making the LAMPP directory in OPT. How do I gain permission to mkdir in OPT?

Regards,

Ben
PhaseMaster
 
Posts: 5
Joined: 05. December 2011 20:56
Operating System: Ubuntu

Re: mkdir permissson denied

Postby JonB » 05. December 2011 22:48

there are two possibilities

A. - your 'su' command did not work as expected -

did your prompt change to something like this???
Code: Select all
[jonb@localhost ~]$ su
Password:
[root@localhost jonb]# 


For 'su' (unlike sudo) the pw is the 'root' user's password, not your password (unless they happen to be the same) (just saying).
and - your prompt should change - the 'jonb' in [root@localhost jonb]# is the tail of the present working directory which was /home/jonb

B. something wierd has happened, that I cannot grok right now.

With linux you must be terribly careful of case, so when you reference folder names, be sure to type them exacly as you used them in the command line, or code.
This refers to making the LAMPP directory in OPT.

so that is not 'right'... it leads to big confusions.

Thanks and Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: mkdir permissson denied

Postby PhaseMaster » 05. December 2011 23:27

Here is my command line input and output:

Code: Select all
ben@ben-Dell-XPS420:~$ su ben
Password:
ben@ben-Dell-XPS420:~$ mkdir /opt/lampp
mkdir: cannot create directory `/opt/lampp': Permission denied
ben@ben-Dell-XPS420:~$
PhaseMaster
 
Posts: 5
Joined: 05. December 2011 20:56
Operating System: Ubuntu

Re: mkdir permissson denied

Postby JonB » 06. December 2011 00:50

"no, no, no'" :shock:

You must be 'root' - not 'ben'. Note your prompt did not change...

by placing 'ben' on the argument line with no other arguments you are affecting NOTHING. because you already ARE 'ben'

the command is exactly as I put in the last post.
Code: Select all
[jonb@localhost ~]$ su
Password:
[root@localhost jonb]#


see there is no 'jon', on the su command line... :idea:

The su command changes user credentials to those of the root user or to the user specified by the Name parameter, and then initiates a new session

http://publib.boulder.ibm.com/infocente ... 5%2Fsu.htm

make that change and it should work.

Good Luck
8)





ysssf
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: mkdir permissson denied

Postby PhaseMaster » 06. December 2011 01:40

My problem is solved.
PhaseMaster
 
Posts: 5
Joined: 05. December 2011 20:56
Operating System: Ubuntu


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 15 guests

cron