LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 05: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, 06: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, 06:28 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,341
Blog Entries: 55

Rep: Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538
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, 06: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, 06:47 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,341
Blog Entries: 55

Rep: Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538
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, 05:14 AM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,683

Rep: Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259
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 08:17 AM
Changing the permission denied error message w00tb0t Linux - Security 2 07-10-2009 12:20 PM
Permission Denied Error Message when trying to mount an NFS share kaplan71 Fedora 1 02-14-2009 07:26 AM
'permission denied" inspite of right permission flags on network drive anirudhvij Linux - Enterprise 8 05-22-2007 05:57 AM
permission denied message at login p_test Linux - Newbie 2 10-07-2004 02:53 PM


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