LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-24-2017, 03:56 AM   #1
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 127

Rep: Reputation: 0
chown and chmod are NOT working


PHP Code:
[root@RAC1 ~]# mkdir -p /u01/app/grid
[root@RAC1 ~]# chown -R grid:oinstall/u01/app/grid
[root@RAC1 ~]# chmod -R 775 /u01/app/grid 
PHP Code:
[root@RAC1 ~]# cd /u01/
[root@RAC1 u01]# ls -l
total 4
drwxr
-xr-x 3 root root 4096 Nov 24 19:53 app 
>>

Partition details

PHP Code:
# df -TH
Filesystem    Type     Size   Used  Avail Use% Mounted on
/dev/sda3     ext3     6.3G   1.1G   5.0G  18% /
/
dev/sda9     ext3     4.3G   143M   3.9G   4% /opt
/dev/sda8     ext3     3.7G    76M   3.4G   3% /tmp
/dev/sda6     ext3     5.1G   2.8G   2.1G  57% /usr
/dev/sda5     ext3     5.3G   146M   4.9G   3% /u02
/dev/sda2     ext3      13G   166M    12G   2% /u01
/dev/sda1     ext3     104M    22M    77M  23% /boot
tmpfs        tmpfs     1.7G      0   1.7G   0
% /dev/shm 
>>

PHP Code:
# tail -3 /etc/passwd
sabayon:x:86:86:Sabayon user:/home/sabayon:/sbin/nologin
grid
:x:550:501::/home/grid:/bin/bash
oracle
:x:551:501::/home/oracle:/bin/bash 
>>

PHP Code:
# tail /etc/group
haldaemon:x:68:
avahi-autoipd:x:103:
xfs:x:43:
gdm:x:42:
sabayon:x:86:
oinstall:x:501:
dba:x:502:oracle
asmadmin
:x:503:grid
asmdba
:x:504:grid,oracle
asmoper
:x:505:grid 

Last edited by Joy Stick; 11-24-2017 at 04:15 AM.
 
Old 11-24-2017, 04:02 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 16,604

Rep: Reputation: 5604Reputation: 5604Reputation: 5604Reputation: 5604Reputation: 5604Reputation: 5604Reputation: 5604Reputation: 5604Reputation: 5604Reputation: 5604Reputation: 5604
at first, please use [code][/code] tags to keep formatting and to avoid smileys
next, please explain what do you want to achieve/demonstrate. What did you expect and what's happened instead?
 
Old 11-24-2017, 04:12 AM   #3
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,869

Rep: Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051Reputation: 2051
https://www.linuxquestions.org/quest...orking-680553/

Did you even look at above link ?

We are supposed to guess what you are trying to do and why it's "not working" for you ?

I'm really not trying to be smart but, for someone who claims to be a Oracle DBA, you should be able to do some basic troubleshooting before posting yet another question, yet again.

Also, if you have been a member since 2015, shouldn't you be posting in a different forum rather than the "Newbies" forum ?

bye
 
Old 11-24-2017, 04:31 AM   #4
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 127

Original Poster
Rep: Reputation: 0
Hi,

I want to know the reason clearly.I want to know the reason clearly.

I set ownership clearly gridinstall for /u01/... directories
When i am listing , it shows only root ownership

PHP Code:
[root@RAC1 u01]# mkdir -p /u01/app/grid
[root@RAC1 u01]# mkdir -p /u01/product/11.2.0/grid
[root@RAC1 u01]# chown -R grid:oinstall /u01/app/grid/
[root@RAC1 u01]# chown -R grid:oinstall /u01/product/11.2.0/grid/
[root@RAC1 u01]# chmod -R 775 /u01/app/grid/
[root@RAC1 u01]# chmod -R 775 /u01/product/11.2.0/grid/ 
PHP Code:
[root@RAC1 u01]# ls -l
total 8
drwxr
-xr-x 3  root root 4096 Nov 24 19:53 app
drwxr
-xr-x 3  root root 4096 Nov 24 20:16 product 

My questions are

'grid' ownership are NOT applied on /u01/app/.. and /u01/product/.. directories

Last edited by Joy Stick; 11-24-2017 at 04:32 AM.
 
Old 11-24-2017, 05:41 AM   #5
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,203

Rep: Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378Reputation: 1378
Quote:
Originally Posted by Joy Stick View Post
'grid' ownership are NOT applied on /u01/app/.. and /u01/product/.. directories
Because you didn't apply ownership to them.

Quote:
Originally Posted by Joy Stick View Post
Code:
[root@RAC1 u01]# chown -R grid:oinstall /u01/app/grid/ 
[root@RAC1 u01]# chown -R grid:oinstall /u01/product/11.2.0/grid/
Why do you think that applying ownership to /u01/app/grid would change ownership of /u01/app?
Quote:
Originally Posted by Joy Stick View Post
Code:
[root@RAC1 u01]# ls -l 
total 8 
drwxr-xr-x 3  root root 4096 Nov 24 19:53 app
 
1 members found this post helpful.
Old 11-24-2017, 08:19 AM   #6
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1040Reputation: 1040Reputation: 1040Reputation: 1040Reputation: 1040Reputation: 1040Reputation: 1040Reputation: 1040
In other words, if you:
Code:
chown -R foo:foo /path/to/dir/
Everything in /path/to/dir/ and below will be chown-ed but not /path/to/dir/ itself. Nothing above the target directory.

jlinkels
 
Old 11-24-2017, 11:00 PM   #7
giis
Member
 
Registered: Nov 2013
Location: Third Rock from Moon
Distribution: RPM/DEB based and LFS
Posts: 73

Rep: Reputation: Disabled
Quote:
Originally Posted by Joy Stick View Post
'grid' ownership are NOT applied on /u01/app/.. and /u01/product/.. directories
You changed sub-directory owner-ship of /u01/app/ and /u01/product/ not the parent-directory itself. Try:

Quote:
chown -R gridinstall /u01/app/
 
  


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
chmod and chown not working NirvanaII Mandriva 11 12-06-2008 08:08 PM
chown v/s chmod justmovedtolinux Linux - Newbie 3 10-02-2008 06:43 AM
chmod chown permissions not working operation not allowed UMG:Chicken_Sop Slackware 1 11-06-2007 12:15 AM
chown and chmod specialized Linux - Hardware 9 04-04-2006 09:26 PM
Chmod ,chown ,chgrp commands not working proper---------------- pal Linux - Newbie 12 03-07-2005 09:55 AM

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

All times are GMT -5. The time now is 11:30 PM.

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