samnyc
March 21, 2014, 9:42am
1
I am trying to change the directory to owner of Sybase. But I get permission denied. I did login as root.
newd1> ls -l
total 58
drwxr-xr-x 2 prod develop 5 Oct 17 06:51 bin
drwxr-xr-x 2 prod develop 7 Oct 17 07:18 etc
dr-xr-xr-x 1 root root 1 Jan 19 22:02 lib
drwxr-xr-x 2 prod develop 708 Dec 11 03:24 log
dr-xr-xr-x 2 root root 2 Nov 12 2010 src
dr-xr-xr-x 1 root root 1 Jan 19 22:02 sybase
newd1> chown sybase sybase
chown: sybase: Permission denied
newd1> id
uid=0(root) gid=0(root) groups=0(root),1(other),2(bin),3(sys),4(adm),5(uucp),6(mail),7(tty),8(lp),9(nuucp),12(daemon)
newd1> df -h /ilx
Filesystem sizerp used avail capacity Mounted on
rpool/ilx 134G 938M 90G 2% /ilx
rpool is at ZFS.
newd1> zpool status
pool: pool5
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
pool5 ONLINE 0 0 0
c5t600A0B800021A5B40000298B46A8DC30d0 ONLINE 0 0 0
errors: No known data errors
pool: rpool
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
c1t0d0s0 ONLINE 0 0 0
c1t1d0s0 ONLINE 0 0 0
errors: No known data errors
vbe
March 21, 2014, 10:02am
2
I would like to see a df ( complete ) of the system, what you show us doesnt help know where you are and on what you are trying a chown... but the only probant case I see root not being able to anything would be NFS... (So is sybase a NFS mount ? )
Neo
March 21, 2014, 10:02am
3
Do you have a valid user with username "sybase"?
Please post your /etc/passwd file if not sure.
1 Like
samnyc
March 21, 2014, 10:20am
5
newd1> df
/ (rpool/ROOT/solaris10u9):10116867 blocks 10116867 files
/devices (/devices ): 0 blocks 0 files
/system/contract (ctfs ): 0 blocks 2147483607 files
/proc (proc ): 0 blocks 29946 files
/etc/mnttab (mnttab ): 0 blocks 0 files
/etc/svc/volatile (swap ):35902896 blocks 7151846 files
/system/object (objfs ): 0 blocks 2147483437 files
/etc/dfs/sharetab (sharefs ): 0 blocks 2147483646 files
/platform/sun4u-us3/lib/libc_psr.so.1(/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap2.so.1):10116867 blocks 10116867 files
/platform/sun4u-us3/lib/sparcv9/libc_psr.so.1(/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap2.so.1):10116867 blocks 10116867 files
/dev/fd (fd ): 0 blocks 0 files
/tmp (swap ):35902896 blocks 7151846 files
/var/run (swap ):35902896 blocks 7151846 files
/ilx (rpool/ilx ):189689044 blocks 189689044 files
/rpool (rpool ):189689044 blocks 189689044 files
/sybdata (pool5/sybdata ):455095694 blocks 455095694 files
/usr/sybase (pool5/sybase ): 6605930 blocks 6605930 files
/home (clnt-corp-p0035:/vol/fnr_tdndev_fridge_snap/home):9135153800 blocks 14242703 files
Along with checking if its a nfs mount, i would suggest also to use truss to see if it gives whats happening, getfacl, and make sure file system is not on read only mode and you are able to create new files.
#truss chown sybase sybase
#getfacl sybase
Neo
March 21, 2014, 10:40am
7
Please check /etc/passwd file for a valid user "sybase" first.. thanks.
samnyc
March 21, 2014, 10:44am
8
Sorry about the question mark. Yes. this server is on NFS but the directory Sybase is local which is connected to EMC disk storage using ZFS.
newd1> cat /etc/passwd |grep sybase
newd1>
---------- Post updated at 10:44 AM ---------- Previous update was at 10:40 AM ----------
This system is on NFS but this directory is local which is connected to EMC storage running ZFS. Sybase is not on local account. It's on the NIS master server.
Neo
March 21, 2014, 10:44am
9
Since you do not have a valid user "sybase" in /etc/passwd, you are not going to be able to change user to "sybase".
Update: If NFS is operating properly, then of course the statement above is not valid.
If its on NIS, then make sure your account is actually exists on the NIS master server. If it exists, make sure /etc/passwd has sybase entry.
#getent passwd sybase
1 Like
NFS does not care if you're root, being on a different machine -- you're someone else's root, not the root. Whether it'll allow you is down to its configuration.
samnyc
March 21, 2014, 12:07pm
13
newd1> getent passwd sybase
sybase:4zbnZQj405.kQ:4031:50:Sybase User (Shared Account):/home/s/sybase:/usr/local/bin/bash
how do I set the directory to Sybase user. Should I create the user local to this server?
That's up to you, you seemed to want it to be on the NFS.
Neo
March 21, 2014, 1:23pm
15
As Corona said, that's "up to you"; but as a trouble shooting exercise you could create a local sybase user in local /etc/passwd and see if and how it work; then decide what do to later.
samnyc
March 25, 2014, 10:47am
16
Just for a test. I created a folder called xyz. I then changed the permission to Sybase. It allowed to me. Please see below.
newd1> ls -ld sybase
dr-xr-xr-x 1 root root 1 Jan 19 22:02 sybase
newd1> ls -ld xyz
-rw-r--r-- 1 sybase root 0 Mar 25 10:39 xyz
newd1> chown sybase sybase
chown: sybase: Permission denied
If it's not on the NFS of course it will let you...