ROCK1972
asked on
df: cannot statvfs (mounting permission problems)
When I'm as root, I see all my partitions. When I'm as test user, I get these errors
# df -k
Filesystem kbytes used avail capacity Mounted on
/proc 0 0 0 0% /proc
/dev/dsk/c0t0d0s0 963979 48229 857912 6% /
/dev/dsk/c0t0d0s4 1984175 833739 1090911 44% /usr
fd 0 0 0 0% /dev/fd
/dev/dsk/c0t0d0s1 721751 117039 546972 18% /var
/dev/dsk/c0t0d0s5 3009655 397982 2551480 14% /export
/dev/dsk/c0t0d0s6 963979 17016 889125 2% /export/home
/dev/dsk/c0t0d0s7 8742181 7402003 1252757 86% /opt
df: cannot statvfs /opt/test/1: Permission denied <-------
df: cannot statvfs /opt/test/2: Permission denied <-------
df: cannot statvfs /opt/test/3: Permission denied <-------
/dev/dsk/c0t1d0s3 963979 21 906120 1% /var/log
Also /opt looks mounted, but when I got there, I get a permission denied
# cd /opt
/opt: Permission denied
I have several such machines, and this is the only one giving me problems.
/opt/test/1 /opt/test/2 /opt/test/3 are on a separate hard disk but that hard disk looks healthy when I type format
io1# more /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s3 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s4 /dev/rdsk/c0t0d0s4 /usr ufs 1 no -
/dev/dsk/c0t0d0s1 /dev/rdsk/c0t0d0s1 /var ufs 1 no -
/dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /export ufs 2 yes -
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /export/home ufs 2 yes -
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /opt ufs 2 yes -
/dev/dsk/c0t1d0s1 /dev/rdsk/c0t1d0s1 /opt/test/1 ufs 2 yes -
/dev/dsk/c0t1d0s0 /dev/rdsk/c0t1d0s0 /opt/test/2 ufs 2 yes -
/dev/dsk/c0t1d0s4 /dev/rdsk/c0t1d0s4 /opt/test/3 ufs 2 yes -
/dev/dsk/c0t1d0s3 /dev/rdsk/c0t1d0s3 /var/log ufs 2 yes -
#format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <FUJITSU-0112 cyl 10498 alt 2 hd 8 sec 425>
/pci@1f,0/pci@1,1/scsi@4,1 /sd@0,0
1. c0t1d0 <FUJITSU-0112 cyl 10498 alt 2 hd 8 sec 425>
/pci@1f,0/pci@1,1/scsi@4,1 /sd@1,0
Anyone knows what the problem may be here?? Or some suggestions where I could check??
# df -k
Filesystem kbytes used avail capacity Mounted on
/proc 0 0 0 0% /proc
/dev/dsk/c0t0d0s0 963979 48229 857912 6% /
/dev/dsk/c0t0d0s4 1984175 833739 1090911 44% /usr
fd 0 0 0 0% /dev/fd
/dev/dsk/c0t0d0s1 721751 117039 546972 18% /var
/dev/dsk/c0t0d0s5 3009655 397982 2551480 14% /export
/dev/dsk/c0t0d0s6 963979 17016 889125 2% /export/home
/dev/dsk/c0t0d0s7 8742181 7402003 1252757 86% /opt
df: cannot statvfs /opt/test/1: Permission denied <-------
df: cannot statvfs /opt/test/2: Permission denied <-------
df: cannot statvfs /opt/test/3: Permission denied <-------
/dev/dsk/c0t1d0s3 963979 21 906120 1% /var/log
Also /opt looks mounted, but when I got there, I get a permission denied
# cd /opt
/opt: Permission denied
I have several such machines, and this is the only one giving me problems.
/opt/test/1 /opt/test/2 /opt/test/3 are on a separate hard disk but that hard disk looks healthy when I type format
io1# more /etc/vfstab
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s3 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s4 /dev/rdsk/c0t0d0s4 /usr ufs 1 no -
/dev/dsk/c0t0d0s1 /dev/rdsk/c0t0d0s1 /var ufs 1 no -
/dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /export ufs 2 yes -
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /export/home ufs 2 yes -
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /opt ufs 2 yes -
/dev/dsk/c0t1d0s1 /dev/rdsk/c0t1d0s1 /opt/test/1 ufs 2 yes -
/dev/dsk/c0t1d0s0 /dev/rdsk/c0t1d0s0 /opt/test/2 ufs 2 yes -
/dev/dsk/c0t1d0s4 /dev/rdsk/c0t1d0s4 /opt/test/3 ufs 2 yes -
/dev/dsk/c0t1d0s3 /dev/rdsk/c0t1d0s3 /var/log ufs 2 yes -
#format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <FUJITSU-0112 cyl 10498 alt 2 hd 8 sec 425>
/pci@1f,0/pci@1,1/scsi@4,1
1. c0t1d0 <FUJITSU-0112 cyl 10498 alt 2 hd 8 sec 425>
/pci@1f,0/pci@1,1/scsi@4,1
Anyone knows what the problem may be here?? Or some suggestions where I could check??
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
> have the test user permissions
Could you umount those /opt/test/1, /opt/test/2, and /opt/test/3 as root and "chmod 755 /opt/test/*"?
Then mount those 3 filesystem again.
Wesly
Could you umount those /opt/test/1, /opt/test/2, and /opt/test/3 as root and "chmod 755 /opt/test/*"?
Then mount those 3 filesystem again.
Wesly
ASKER
Here's another error message/weirdness...
# statvfs
/opt/test/statvfs: Permission denied
!?!?
And when I type some other commands, it gives me similar errors
# statvfs
/opt/test/statvfs: Permission denied
!?!?
And when I type some other commands, it gives me similar errors
ASKER
>Could you umount those /opt/test/1, /opt/test/2, and /opt/test/3 as root and "chmod 755 /opt/test/*"?
>Then mount those 3 filesystem again.
Sure. I'll do that, on those filesystems. But .. the problems also lies in the /opt directory which *IS* mounted (take a look above) and is giving me permission problems, I cannot cd to /opt and /opt has both root and test user folders and I cannot just chown all of /opt as 'test' cause its gonna mess up my system...
>Then mount those 3 filesystem again.
Sure. I'll do that, on those filesystems. But .. the problems also lies in the /opt directory which *IS* mounted (take a look above) and is giving me permission problems, I cannot cd to /opt and /opt has both root and test user folders and I cannot just chown all of /opt as 'test' cause its gonna mess up my system...
ASKER
Ok, did what you asked wesly and no change... get the same "permission denied" when I try to cd to /opt
and /opt/test/1 /opt/test/2 /opt/test/3
and /opt/test/1 /opt/test/2 /opt/test/3
As root what does 'ls -ld /opt /opt/test /opt/test/*' show?
> "chmod 755 /opt/test/*"
Oops, should be
# chmod -R 755 /opt/test/*
Wesly
Oops, should be
# chmod -R 755 /opt/test/*
Wesly
Can you mount the disk to different dir, eg /mnt? If you can umount them and mount
them to a different dir, you can delete dir 1/2/3 under /opt/test, then remake the empty
dirs.
If you still have problem, shutdown the system, use Solaris CD to boot up the box in single user mode, then run "fsck" to all filesystem
eg :
fsck -y /dev/rdsk/c0txd0sx
them to a different dir, you can delete dir 1/2/3 under /opt/test, then remake the empty
dirs.
If you still have problem, shutdown the system, use Solaris CD to boot up the box in single user mode, then run "fsck" to all filesystem
eg :
fsck -y /dev/rdsk/c0txd0sx
> shutdown the system, use Solaris CD to boot up the box in single user mode
For fsck, is it necessary to use CD to boot into single user mode?
Or in the "ok" prompt type in "boot -s" is enough? That's what I usually did.
Wesly
For fsck, is it necessary to use CD to boot into single user mode?
Or in the "ok" prompt type in "boot -s" is enough? That's what I usually did.
Wesly
When you have a system in unknow status, it is better to use Solaris CD to boot up to
single user mode. Of course, if you are positive about the OS filesystem, then you can
just do "boot -s". Just image the situation that / ( /dev/rdsk/c0t0d0s0 ), and you run
the fsck from the HD might not be able to fix your filesystem!.
single user mode. Of course, if you are positive about the OS filesystem, then you can
just do "boot -s". Just image the situation that / ( /dev/rdsk/c0t0d0s0 ), and you run
the fsck from the HD might not be able to fix your filesystem!.
I'm somewhat skeptical as to it being a file system problem since things behave proper for root. I'd still like to know what 'ls -ld /opt /opt/test /opt/test/*' shows because sounds very much like a permissions issue.
ASKER
Ok, the problem was the permissions on the /opt folder. They were set to
drwxr-rr-r 2 root root /opt
I'll give 1/2 of the points to wesly and 1/2 go jlevie. Thanks for the help guys!
drwxr-rr-r 2 root root /opt
I'll give 1/2 of the points to wesly and 1/2 go jlevie. Thanks for the help guys!
ASKER
Ah,. For some reason I was not able to split them... wesley, if you want ask the admin to contact me and Ill tell them to give you 1/2 of the points. jlevie did have the solution from the start, i was wasn't paying attention!!! Thanks guys!
I thought that would be what the problem was.
ASKER
Thanks yuzh. I'll fix that now.
ASKER
/opt has directories belonging both to root and the test
And on all other machines I can go to to /opt/test/1 /opt/test/2 /opt/test/3 as test user no problem **AND** when I 'su' I get those 3 filesystems mounted no problem and all 3 are with the test permissions!!