could not delete file in unix


  I have a file(Below mentioned) in unix.Could not delete it with rm command.Bascially i down loaded this file for gzipl(gzip exe).Please help me on this.

-rw-r--r--   1 jg88723  aml       507392 Mar  8 16:48 gzipl

please help me on this.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What error do you get?

Are you the owner of the file?

Is the file on a NFS mounted filesystem?
if you login name is not jg88723 and you current session is not the super user root, you don't have permission to delete the file.

You can su as root (if you know the password) to delete or ask your sys adm to do it for you.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
As pointed by yuzh, you can not delete a file if you are neither the administrator (root) nor the owner of the file. If you are indeed the owner of the file (jg88723  in this case), it is still possible not to be able to delete the file. This happens when the write permission from the parent directory of the file is removed after the file is created.

Solution: Go to the directory that contains the parent directory of this file. For example if the above ls command was used from directory /user/home/temp/data1, then go to directory /user/home/temp/ . If you do an ls here, you will see that the write privilege on the directory has been removed. Change the privilege by executing the following:

$ chmod u+w data1

Now the directory will be writable. It would now be possible to go to the directory where file gzipl is executing and remove the file.

The whole solution is only applicable of you are owner of the file and the directory.
> As pointed by yuzh, you can not delete a file if you are neither the administrator (root) nor the owner of the file.
Correction. You don't have to own the file. You have to have write permission to the directory it resides in (unless there is sticky bit set on the dir).
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.