Operating System - HP-UX
1827294 Members
1306 Online
109960 Solutions
New Discussion

Re: Unable to remove Directory

 
SOLVED
Go to solution
Stephen Keogh
Advisor

Unable to remove Directory

Parent Directory looks like
/home/admin/lemkem/2002
# ls -ld
drwxr-xr-x 17 root sys 1024 Mar 20 09:47
Child Directory looks like
/home/admin/lemkem/2002
# ls -l
drwxr-xr-x 2 root sys 96 Mar 20 10:18 3sw
# ls -la 3sw
total 2
drwxr-xr-x 2 root sys 96 Mar 20 10:18 .
drwxr-xr-x 17 root sys 1024 Mar 20 09:47

# rmdir 3sw
rmdir: 3sw: Permission denied
# chmod 777 3sw
chmod: can't change 3sw: Not owner
# whoami
root
# who am i
root pts/0 Mar 20 15:30

I should add Parent Directory, Child Directory and file(s) ( since deleted ) were originally owned by "nobody". Ownership changed using chown root:sys *

Many thanks

Steve
4 REPLIES 4
Tracey
Trusted Contributor

Re: Unable to remove Directory

Looks like it could be a symbolic link. Try ls -laF

The F will show you if it is a link or not.
Volker Borowski
Honored Contributor
Solution

Re: Unable to remove Directory

Could it be, that the directory is NFS-mounted (your "nobody" statement let me assume this).

cd
bdf .

-> should show if nfs-mounted or not

Solution:
mount with -root option
or
login to NFS-Host and delete there !

Hope this helps
Volker


Satish Y
Trusted Contributor

Re: Unable to remove Directory


/bin/rm -R --

Cheers..
Satish.
Difference between good and the best is only a little effort
Satish Y
Trusted Contributor

Re: Unable to remove Directory

Sorry, small correction, it's not parent directory...

/bin/rm -R --

it was a typo

Cheers..
Satish.
Difference between good and the best is only a little effort