LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-20-2013, 04:03 AM   #1
textillis
Member
 
Registered: May 2013
Location: Northern Rivers, NSW, Australia
Distribution: Slackware64-current, Mint Nadya
Posts: 299

Rep: Reputation: 2
directory ownership


Could someone decipher what this output means please:

Code:
bash-4.2$ mkdir play
mkdir: cannot create directory 'play': Permission denied
bash-4.2$ ls -l | awk '{print $3}'

root
tex
bash-4.2$
Seems to me that tex and root own the pwd where I'm trying to create directory=play, yet when i give the mkdir command, I get:
Permission denied.
I check ownership with:
ls -l|awk....
and get confirmation that tex and root do, in fact, own this directory.
Thanks,
Discouraged.
(On the verge of abandoning the idea of learning Linux: its wonderful, but EVERY single thing is so hard!)

Last edited by textillis; 05-20-2013 at 04:09 AM.
 
Old 05-20-2013, 05:00 AM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
You simply do not have permission to write into current directory. Just post output of following cmds:
Code:
~$ ls -la
And
Code:
~$ whoami
~$ who am i
 
1 members found this post helpful.
Old 05-20-2013, 05:24 AM   #3
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,252

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
Quote:
ls -l|awk....
and get confirmation that tex and root do, in fact, own this directory.
This is totally untrue. "ls -l" give you only information about content of this directory, not it ownership. Presence of files owned by some users does not means anything about permissions of this directory. You probably want "ls -ld ." to get information about current directory. Even that be aware of that there can be additionally acl permissions.

Last edited by eSelix; 05-20-2013 at 05:27 AM.
 
2 members found this post helpful.
Old 05-20-2013, 07:30 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
I highly recommend you read this tutorial; its very good
http://rute.2038bug.com/index.html.gz

Last edited by chrism01; 05-20-2013 at 07:50 AM. Reason: took out some rubbish :)
 
1 members found this post helpful.
Old 05-20-2013, 07:35 AM   #5
textillis
Member
 
Registered: May 2013
Location: Northern Rivers, NSW, Australia
Distribution: Slackware64-current, Mint Nadya
Posts: 299

Original Poster
Rep: Reputation: 2
various outputs requested

thanks for response: output for:

ls -la

Code:
bash-4.2$ ls -la
total 24
drwxr-xr-x  2 tex users  4096 May 20 21:31 .
drwxrwxrwx 31 tex users  4096 May 20 21:31 ..
-rw-r--r--  1 tex users 13000 May 20 21:22 man_manual.txt
bash-4.2$
and output for:

~ whoami:

Code:
bash-4.2$ whoami
tex
bash-4.2$
~ who am i

Code:
bash-4.2$ who am i
tex      pts/1        2013-05-20 18:41 (:0.0)
bash-4.2$

Last edited by textillis; 05-20-2013 at 07:37 AM.
 
Old 05-20-2013, 08:24 AM   #6
textillis
Member
 
Registered: May 2013
Location: Northern Rivers, NSW, Australia
Distribution: Slackware64-current, Mint Nadya
Posts: 299

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by chrism01 View Post
I highly recommend you read this tutorial; its very good
http://rute.2038bug.com/index.html.gz
I'm deep into Chris.

Just the thing I was after!
Much obliged.

Tex
 
Old 05-20-2013, 08:39 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
After that, feel free to wander through www.linuxtopia.org; loads of free to read manuals/books.
 
1 members found this post helpful.
Old 05-20-2013, 08:43 AM   #8
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
It sounds you were in different directory when you tried to create a new directory i.e. play. Since you're the owner of the current directory (denoted by a dot (.)), and you've write permission on it, so you can create a directory. However, once again try to create the directory again and before that check whether you've write permission on it's parant directory or not. Invoke following cmds (i.e. pwd and mkdir play) and let's know if it still gives the same error:
Code:
bash-4.2$ ls -la
total 24
drwxr-xr-x  2 tex users  4096 May 20 21:31 .
drwxrwxrwx 31 tex users  4096 May 20 21:31 ..
-rw-r--r--  1 tex users 13000 May 20 21:22 man_manual.txt
bash-4.2$ pwd
bash-4.2$ mkdir play
 
1 members found this post helpful.
Old 05-20-2013, 11:11 AM   #9
textillis
Member
 
Registered: May 2013
Location: Northern Rivers, NSW, Australia
Distribution: Slackware64-current, Mint Nadya
Posts: 299

Original Poster
Rep: Reputation: 2
Problem solved, thank you kindly Shivaa.
Et passez une bonne journee!

amicalement,
tex

Quote:
Originally Posted by shivaa View Post
It sounds you were in different directory when you tried to create a new directory i.e. play. Since you're the owner of the current directory (denoted by a dot (.)), and you've write permission on it, so you can create a directory. However, once again try to create the directory again and before that check whether you've write permission on it's parant directory or not. Invoke following cmds (i.e. pwd and mkdir play) and let's know if it still gives the same error:
Code:
bash-4.2$ ls -la
total 24
drwxr-xr-x  2 tex users  4096 May 20 21:31 .
drwxrwxrwx 31 tex users  4096 May 20 21:31 ..
-rw-r--r--  1 tex users 13000 May 20 21:22 man_manual.txt
bash-4.2$ pwd
bash-4.2$ mkdir play
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Audit ownership on directory and subdirs TeddyGmail Linux - Security 3 03-05-2013 02:36 AM
Directory ownership or permissions inside another directory Slyfox696 Linux - Newbie 3 11-02-2012 03:14 PM
Change ownership of an entire directory. Shay Linux - Newbie 3 07-02-2010 10:03 PM
mount directory ownership shakezilla Slackware 3 01-24-2007 12:39 AM
ownership of directory lsu420luv Linux - General 1 06-09-2005 05:36 PM


All times are GMT -5. The time now is 06:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration