LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-29-2016, 07:30 PM   #1
cmoore90638
Member
 
Registered: May 2013
Posts: 30

Rep: Reputation: Disabled
root permission denied


I will apologize for the last thread I should know better then to try and explain something when I am Irritated. I did not know how much I had sent you I thought it was just the last screen not the whole session.

I have a few small problems that I need to separate out and deal with them individually.

I am running slackware 14.1.when I try to look at /etc/passwd as root it gives me a permission denied,I have tried other directories and get the same results.I have read through all the previous questions on this site that were similar, but nothing worked. I copied just the screen I was on so you might see what I was trying to do.






root@chuck:~# /
-su: /: Is a directory
root@chuck:~# /boot
-su: /boot: Is a directory
root@chuck:~# /etc
-su: /etc: Is a directory
root@chuck:~# /etc/passwd
-su: /etc/passwd: Permission denied
root@chuck:~# /user/local
-su: /user/local: No such file or directory
root@chuck:~# /home
-su: /home: Is a directory
root@chuck:~# /proc/cpuinfo.
-su: /proc/cpuinfo.: No such file or directory
root@chuck:~#
 
Old 06-29-2016, 08:11 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,271

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
When you just type the name of a file or directory, your shell tries to execute that as a command, and that's going to fail if that name is a directory or a non-executable file. If you just want to view /etc/passwd (which you can do as a non-root user, BTW), you need to run some command that will display that file on your terminal, such as
Code:
cat /etc/passwd
less /etc/passwd
... etc.
 
1 members found this post helpful.
Old 06-29-2016, 08:14 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 15,326
Blog Entries: 25

Rep: Reputation: 4391Reputation: 4391Reputation: 4391Reputation: 4391Reputation: 4391Reputation: 4391Reputation: 4391Reputation: 4391Reputation: 4391Reputation: 4391Reputation: 4391
Su means "substitute user." If no username is specified, it defaults to root. You do not "su" to a directory.

Code:
$ su
Password:     <---enter root password
#
You may now execute commands as root.


Code:
$ su [someuser]
Password:     <---enter password for [someuser]
#
You may now execute commands as [someuser].

See

Code:
$ man su
for more.

Last edited by frankbell; 06-29-2016 at 08:18 PM.
 
  


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
[SOLVED] Permission denied as root to a root-owned directory threevolve Ubuntu 3 06-06-2013 07:27 AM
mkdir throws Permission Denied error in a directoy even with root ownership and 777 permission surajchalukya Linux - Security 14 09-03-2012 08:34 AM
permission denied for root!!?? a1ora0 Slackware - Installation 1 09-29-2007 03:50 AM
su root permission denied stardotstar Linux - Software 6 08-20-2006 08:24 PM
root permission denied xmaspie Linux - Newbie 2 11-05-2003 01:05 PM

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

All times are GMT -5. The time now is 10:43 AM.

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