LinuxQuestions.org
Register a domain and help support LQ
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 04-20-2009, 12:08 PM   #1
rosewood
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Rep: Reputation: 0
Permissions


Hi All,

I have a installed oracle on Redhat 5. I want to grant execute permission on oracle files to other user 'A' which is in same group. Could you please help me the command.

I accidentally executed chmod 7777 to oracle dir. The original permissions are look like drwx------ what is command to put it back the original permissions.

Any ones help is much appreciated.

Thanks
 
Old 04-20-2009, 12:27 PM   #2
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 88
You shoud be able to restore the original permissions with:
Code:
chmod 0700 dirname #basic permissions
chmod a-s dirname #remove setuid bits
To grant execute permissions for all files within a particular directory for everyone in the group owning the files (as well), you would use:
Code:
chmod -R 0750 dirname # set all permissions (-R means recursive, or:
chmod -R g+rx dirname # add read and execute permissions specifically for the group
This will also add read permission for the group (execute permission is not worth much if you can't read a file). See man chmod for more.

Was this what you were looking for?
Rob

Last edited by Robhogg; 04-20-2009 at 12:29 PM.
 
Old 04-20-2009, 12:38 PM   #3
rosewood
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Hi Robhogg,

Thanks a lot for your help. It it is working perfect. I got one error one I execute following command.

oraapps> chmod -R g+rx portal
chmod: nmb: cannot change mode [Operation not permitted]
chmod: nmo: cannot change mode [Operation not permitted]
chmod: ssomigrate: cannot change mode [Operation not permitted]

Do you think because those files are owned my root ?

Thanks
 
Old 04-20-2009, 12:48 PM   #4
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 88
It could be. You could check who owns them with ls -l filename

Another possibility, though, is that additional file attributes have been set. lsattr filename would show you whether, e.g., the immutable bit has been set (an i in the output). If so, you could use chattr to change the attributes.

However, some files are not meant to be directly executable, or even accessible, by ordinary users - I'd want to do a bit of Googling or check the documentation if the attributes or ownership of these files is different from all the others.
 
Old 04-20-2009, 12:52 PM   #5
rosewood
LQ Newbie
 
Registered: Apr 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks a lot Robhogg for your help
 
  


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
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 01:00 PM
permission ... permissions .... permissions alaios Linux - General 1 05-31-2005 05:16 AM
permissions! Help! mikedeatworld Linux - Software 1 10-22-2004 10:20 PM
getting a directory's permissions and creating a new one with the same permissions newbie1000101 Programming 1 04-10-2004 01:52 PM
don't have permissions? brian0918 Linux - Software 8 04-05-2003 01:59 PM


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