Link to home
Start Free TrialLog in
Avatar of shchong2
shchong2

asked on

How to remove files when seeing "rm: cannot unlink `file': Permission denied" ???

Hi,

I'm cleaning one of my directories in Unix.
When I do "rm -rf " , i got the messages saying :-

...
rm: cannot unlink `xxxxx.sch': Permission denied
rm: cannot unlink `zzzzz.sch': Permission denied
...


I'm the owner of the files, and has set the file permissions to 775.

...
-rwxrwxr-x    1 schong   users      909 Jun 16  2003 xxxxx.sch*
-rwxrwxr-x    1 schong   users     687 Jun 16  2003 zzzzz.sch*
...

And I'm in the same group :-

>>> id -gn
users


Pls kindly advise !!! Thanks :)
Avatar of Tintin
Tintin

What's the owner/perms of the directory those files are in?  If you don't have perms on the directory, you won't be able to delete them.
Avatar of shchong2

ASKER

Of course, I'm the owner of the directory :-)

drwxr-s---    4 schong   users           512 Jan 21 09:43 ./
drwxr-sr-x    3 schong   users          2048 Jan 21 09:44 ../
drwxrwxr-x    4 schong   users           512 Jan 21 09:42 models/
drwxrwxr-x    2 schong   users           512 Jun 16  2003 myprim/
ASKER CERTIFIED SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ayway, thx ... i've ask the computing admin to delete for me.
Thx.
Are these files on a NFS mounted directory?
schong2: this is time tested solution