LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-30-2013, 06: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, 08: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, 08: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 08:49 AM.
 
Old 01-30-2013, 08:51 AM   #4
dmx
LQ Newbie
 
Registered: Jan 2013
Posts: 3

Rep: Reputation: Disabled
@shivaa:
thanks that was a typo.
 
Old 01-30-2013, 07:53 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Seeing as your profile says RHEL5, you can use rpm
http://www.cyberciti.biz/tips/reset-...ermission.html
 
Old 02-03-2013, 11:20 AM   #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



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 06:18 AM
ICEauthority file permissions mysteriously changed andy_g_gray Linux - Software 0 03-06-2006 02:48 PM
file permissions cant be changed! shishimo Fedora 1 12-04-2004 10:23 AM
FIle permissions changed after power surge..HELP!! spaceagedevice Linux - Newbie 5 06-16-2004 04:45 AM
Something Changed File Permissions anthony114 Linux - Security 2 08-12-2003 08:53 PM

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

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