LinuxQuestions.org
Visit Jeremy's Blog.
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-2014, 06:47 AM   #1
srijivdimri
Member
 
Registered: Jun 2013
Location: India.
Posts: 35

Rep: Reputation: Disabled
Getting 'permission denied' message.


Hi EXPERTS,

I hope I dint messed up things big time, but I am getting the 'permission denied' message when trying to view or modify a directory/file of a different user from root account. This issue started to happen when I accidentally ran ' chmod -R 755 / ' .

[root@shfcolo-opfch-rtd1 data]# su amanda
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
DISPLAY set to 106.51.43.133:0
bash: /dev/null: Permission denied
[amanda@shfcolo-opfch-rtd1 data]$ crontab -e
/tmp/crontab.jGP5fB: Permission denied

please help me to get out of this trouble.

Appreciate all your help in advance.
 
Old 06-08-2014, 07:28 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Are you trying to do this as root or as a normal user?
jdk
 
Old 06-08-2014, 07:28 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Quote:
Originally Posted by srijivdimri View Post
I accidentally ran ' chmod -R 755 / ' .
Undo your atrocious error and next time think before you act.
 
1 members found this post helpful.
Old 06-08-2014, 07:32 AM   #4
srijivdimri
Member
 
Registered: Jun 2013
Location: India.
Posts: 35

Original Poster
Rep: Reputation: Disabled
Thanks jdk,

I am trying to do this as a 'root'.

Thanks unSpawn for looking into this. It was a complete accident. Please let me know how this can be corrected or undo.
 
Old 06-08-2014, 07:47 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
In the case of a RHEL, CentOS, SL or other RPM-using distribution see 'man rpm' (--setperms|--setugids), though that understandably only works for files the RPMDB knows about. For other files you best get the permissions from like a verbose backup listing.
 
Old 06-09-2014, 06:14 AM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
You may be out of luck and have to reinstall. Try unspawns rpm suggestion first - this should restore the system to a usable state, though it will not fix users files (/home got affected too). For that, you would have to go to backups... and even then, files created after the backup will have the wrong access mode.

If the rpm commands don't work you may be out of luck and have to reinstall.
 
  


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
while Checkout from CVS repository, permission denied Message Navink2483 Linux - Server 1 05-21-2012 09:17 AM
Changing the permission denied error message w00tb0t Linux - Security 2 07-10-2009 01:20 PM
Permission Denied Error Message when trying to mount an NFS share kaplan71 Fedora 1 02-14-2009 08:26 AM
'permission denied" inspite of right permission flags on network drive anirudhvij Linux - Enterprise 8 05-22-2007 06:57 AM
permission denied message at login p_test Linux - Newbie 2 10-07-2004 03:53 PM


All times are GMT -5. The time now is 06:24 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