LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 06-08-2018, 01:52 AM   #1
TheMilkMan-Man
Member
 
Registered: Jun 2018
Posts: 46

Rep: Reputation: Disabled
ls: cannot open directory '.': Permission denied


Hey guys, I'm new here and have a question that I hope one of you can answer. I'm using Kali Linux, and created a separate user from the root with the adduser cmd. When I su Milkman then try to list the contents of it, it comes back with ls: cannot open directory '.': Permission denied

I know it's something to do with the permissions, but I'm not exactly sure where to look.

Also, it won't let me sudo Milkman - it will say command not found...any help would be greatly appreciated
 
Old 06-08-2018, 02:33 AM   #2
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by TheMilkMan-Man View Post
Hey guys, I'm new here and have a question that I hope one of you can answer. I'm using Kali Linux, and created a separate user from the root with the adduser cmd. When I su Milkman then try to list the contents of it, it comes back with ls: cannot open directory '.': Permission denied

I know it's something to do with the permissions, but I'm not exactly sure where to look.

Also, it won't let me sudo Milkman - it will say command not found...any help would be greatly appreciated
Why are you using Kali Linux ?

You need to read the sticky thread at the top of this forum, as well as their website, which clearly explains why you should not be using it to begin with. You clearly don't know what you're doing.

Why have you not read either ?
 
Old 06-08-2018, 02:45 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
For a start, you should not be using Kali if you know so little about the Linux permissions system. Kali is a highly specialised distro designed for use by professional penetration testers. It is not suitable for newbies. I would strongly advise you to install Mint or Ubuntu for your first distro.

When you have a permissions problem, your first step should always be to view the ownership and permissions of the file concerned, in this case Milkman's home directory. Most graphical file managers have an option to view the permissions of a selected file. Or you can do it more quickly by opening a terminal and typing ls -l /home. The Milkman directory should be owned by Milkman with full rights (rwx) for the owner. Usually there are read and execute rights for the group (r-x) and the same or no rights at all for the world. If the permissions are not the ones you want, then, as root, change them. But don't do it in Kali! Get yourself a better distro.

As far as sudo is concerned, it only works if you first, as root, add the specified user to the sudoers file with full sudo access, or to a group that is listed in that file as having such access. But again, don't do it in Kali.
 
Old 06-08-2018, 09:02 AM   #4
sgrlscz
Member
 
Registered: Aug 2008
Posts: 123

Rep: Reputation: 84
Quote:
Originally Posted by hazel View Post
When you have a permissions problem, your first step should always be to view the ownership and permissions of the file concerned, in this case Milkman's home directory.
Except, if you do an 'su Milkman', you won't necessarily be in Milkman's home directory. You'll be in the same directory that you were in when you issue the su.

To be in Milkman's home directory, you need to start a login shell using 'su - Milkman' or 'su -l Milkman'.
 
1 members found this post helpful.
Old 06-08-2018, 02:44 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ this.
or, try (as Milkman):
Code:
cd ~
 
Old 06-08-2018, 06:15 PM   #6
fido_dogstoyevsky
Member
 
Registered: Feb 2015
Location: Victoria, Australia
Distribution: Slackware 15
Posts: 490
Blog Entries: 2

Rep: Reputation: 576Reputation: 576Reputation: 576Reputation: 576Reputation: 576Reputation: 576
If you are an experienced Linux user who wants to use Kali Linux you should read this first (edit: especially point 1 which refers to the single (root) user design).

If you are not an experienced Linux user you should read this.

If you are not experienced in Linux and still want to use Kali your best and EASIEST option is to start using a mainstream distro first (Debian would be best since Kali is based on Debian); Kali IS NOT MEANT FOR INEXPERIENCED USERS - Kali "is designed for digital forensics, penetration testing and other network security auditing" by experienced users.

Last edited by fido_dogstoyevsky; 06-08-2018 at 06:18 PM.
 
1 members found this post helpful.
Old 06-08-2018, 06:42 PM   #7
_roman_
Member
 
Registered: Dec 2017
Location: _Austro_Bavaria_
Distribution: gentoo / linux mint
Posts: 433

Rep: Reputation: 29
Thanks for your post. This clarifies a lot. I did not bother so far to read about in detail about KALI.

Quote:
Trying to install Steam on your Kali Linux desktop is an experiment that will not end well.
LOL. Steam does not even work correctly on gentoo. Steam heavily relies on those newbie binary libaries, does hardly use any system libaries, and those libareis which are used need to be compiled in only one way of features. Very bad designed.

Last edited by _roman_; 06-08-2018 at 06:45 PM.
 
Old 06-09-2018, 06:33 AM   #8
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
OK, I can tolerate one question about Kali. But Kali is designed for people who already know Linux. Anyone qualified to use Kali would know the answers to your questions. But I'd be curious, why did you choose Kali?
 
Old 06-09-2018, 09:11 AM   #9
TheMilkMan-Man
Member
 
Registered: Jun 2018
Posts: 46

Original Poster
Rep: Reputation: Disabled
I picked Kali because of it's pen testing tools, that appealed to -me- personally. But now I am operating on Ubuntu because of the advice given here. Maybe one day I will work my way back to Kali, but as advised it's probably not the best distro to learn the linux foundation on. SORRY. WE ALL MAKE MISTAKES.
 
Old 06-09-2018, 09:28 AM   #10
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by TheMilkMan-Man View Post
I picked Kali because of it's pen testing tools, that appealed to -me- personally. But now I am operating on Ubuntu because of the advice given here. Maybe one day I will work my way back to Kali, but as advised it's probably not the best distro to learn the linux foundation on. SORRY. WE ALL MAKE MISTAKES.
Seriously, don't worry about it. It wasn't a mistake, just a learning experience. You are not the first, and certainly won't be the last, to have launched into Kali without learning Linux on a more gently curving slope.

Please don't hesitate to come back on here if you have any issues with your Ubuntu install.
 
1 members found this post helpful.
Old 06-09-2018, 09:32 AM   #11
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
Quote:
SORRY. WE ALL MAKE MISTAKES.
Yup! That's why we have that special article about Kali.

Ubuntu is a good distro to start with, but imho it does too much hand-holding. You might want to move on after a while to Debian or Slackware. Then try Kali, if you're genuinely interested in penetration testing. But mind you do the more destructive tests on your home network! There are tools in Kali that it's actually illegal to use on a public-facing machine.
 
Old 06-09-2018, 10:01 AM   #12
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
TheMilkMan-Man,

Just so you know, you can install the very same "pentesting tools" you would find in Kali, on Ubuntu as well. There's nothing that says you can't - it may even have packages for those tools. I don't think (other than maybe 1 or 2 reply's) that most members that have replied to this thread meant to insult anyone. I'll speak for myself in saying that my reply was not intended that way.

But that said, you should read up on anything Linux before jumping in, as this way you can discover a lot of pitfalls before you fall into a trap to begin with. I never learnt anything about Linux without making mistakes along the way - it happens. No need to feel bad about it, so don't beat yourself up over it. I for one am still happy to try and help you if I can, and you've proven in my eyes that you're someone worth my time in helping.
 
1 members found this post helpful.
Old 06-09-2018, 10:26 AM   #13
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
That's the thing about Kali. You can do everything Kali can do with any major distro. Kali is kind of a shortcut for experts. For that reason it's not beginner friendly.
 
1 members found this post helpful.
Old 06-09-2018, 11:09 AM   #14
TheMilkMan-Man
Member
 
Registered: Jun 2018
Posts: 46

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hazel View Post
Yup! That's why we have that special article about Kali.

Ubuntu is a good distro to start with, but imho it does too much hand-holding. You might want to move on after a while to Debian or Slackware. Then try Kali, if you're genuinely interested in penetration testing. But mind you do the more destructive tests on your home network! There are tools in Kali that it's actually illegal to use on a public-facing machine.
I honestly didn't even see the article about Kali, I googled my error issue and this form came up, I registered and posted. It was super late in the morning too, or, early , whichever you prefer to say.

And yes, I've noticed that Ubuntu has more GUI type installations than Kali does...

..But I STILL CAN'T GET PLAYONLINUX TO WORK, is the program this finicky with -all- distros of linux?!
 
Old 06-09-2018, 11:18 AM   #15
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by TheMilkMan-Man View Post
...But I STILL CAN'T GET PLAYONLINUX TO WORK, is the program this finicky with -all- distros of linux?!
You should continue to try and solve that problem in this thread: https://www.linuxquestions.org/quest...ry-4175631489/

As this is not the right thread for that problem.
 
1 members found this post helpful.
  


Reply



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
Help: postsuper: fatal: scan_dir_push: open directory defer: Permission denied Nickalf Linux - Server 7 09-10-2018 05:28 PM
Home Directory Permission Denied sunveer Linux - Newbie 1 08-18-2012 07:23 PM
PERMISSION DENIED - directory uid0sd Linux - Newbie 3 10-29-2009 01:40 AM
permission denied to home directory ekdya Debian 3 11-08-2005 04:24 PM
permission denied when opening directory pilot1 Linux - General 1 10-23-2002 08:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:20 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
Open Source Consulting | Domain Registration