LinuxQuestions.org
Latest LQ Deal: Linux Power User 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 01-30-2013, 07:36 AM   #1
qazianeel
LQ Newbie
 
Registered: Jan 2013
Location: Karachi
Distribution: RHEL 5
Posts: 7

Rep: Reputation: Disabled
File permissions changed


Hello friends,

While practicing by mistake I've changed permission of following directories with their sub-directories:

drwxr-xr-x 5 777 root 4096 Jan 30 17:26 bin
drwxrwxrwx 2 oracle dba 12288 Jan 30 17:26 sbin
drwxr-xr-x 22 root root 4096 May 21 2012 var
I've to revert back directories file permission.

Please help.

Regards

Aneel Ahmed
 
Old 01-30-2013, 09:12 AM   #2
dmx
LQ Newbie
 
Registered: Jan 2013
Posts: 3

Rep: Reputation: Disabled
chmod 744 <dirname> to change the permission to rwxr-xr-x

I could see bin file owner has also been changed to 777

If that is not intended, please use chmod root:root bin to change back the ownership to root.

Not sure about sbin having orcale as its owner.

Hope this helps.
 
Old 01-30-2013, 09:48 AM   #3
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
Quote:
If that is not intended, please use chmod root:root bin to change back the ownership to root.
This is incorrect. Ownership cannot be changed using chmod, but chown.

@qazianeel:
What command(s) you had invoked? Do not invoke chmod until you specify that what you've done and what changes have made.

Last edited by shivaa; 01-30-2013 at 09:49 AM.
 
Old 01-30-2013, 09:51 AM   #4
dmx
LQ Newbie
 
Registered: Jan 2013
Posts: 3

Rep: Reputation: Disabled
@shivaa:
thanks that was a typo.
 
Old 01-30-2013, 08:53 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

Rep: Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397Reputation: 2397
Seeing as your profile says RHEL5, you can use rpm
http://www.cyberciti.biz/tips/reset-...ermission.html
 
Old 02-03-2013, 12:20 PM   #6
ashish12
LQ Newbie
 
Registered: Feb 2013
Posts: 3

Rep: Reputation: Disabled
chown -R root.root /bin
chmod 755 /bin
chown -R root.root /sbin
chmod 755 /sbin
 
  


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
SMB - File copy from Windows file permissions changed? tiger.woods Red Hat 1 12-04-2012 07:18 AM
ICEauthority file permissions mysteriously changed andy_g_gray Linux - Software 0 03-06-2006 03:48 PM
file permissions cant be changed! shishimo Fedora 1 12-04-2004 11:23 AM
FIle permissions changed after power surge..HELP!! spaceagedevice Linux - Newbie 5 06-16-2004 05:45 AM
Something Changed File Permissions anthony114 Linux - Security 2 08-12-2003 09:53 PM

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

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