You can check to see if your SM allows file deletion via:

SecurityManager.checkDelete(java.lang.String)

Assuming you have a SM

-Jim



Andras Balogh wrote:

> Hi,
>
> I think that the problem is that you don't have the proper permissions
> to delete that file. (in case that your o.s. is Linux type)
> Your webserver runs as a certain user (usually nobody) and the files'
> owner is another user like webmaster.
> So check the chmod and chown commands under Linux.
>
> If it is not Linux that i don't know :))
>
> p.s. It would be great to write the os type and webserver type in a post.
>
> Andras.
>
> ----- Original Message -----
> From: "Deepak C S" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, January 19, 2001 5:01 PM
> Subject: File Deletion----not working
>
> > hi,
> >
> >         I am trying to delete a file under filesystem in a bean using:
> >
> >         File f=new File(path-to-file);
> >         f.delete();
> >
> >         But the File isnt getting deleted...Can anybody help??
> >
> > thanx
> > Deeps
> >
> >
> ___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

--
James Stallard
GlobalOne 13775 McLearen Rd
Phone: (703) 471-2553

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to