View Issue Details

IDProjectCategoryView StatusLast Update
0001911mantisbtbugtrackerpublic2002-05-06 18:49
Reportergstarrett Assigned Toprescience  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformIIS4 / PHP 4.1.2OSNT 4 SP6a 
Product Version0.17.1 
Summary0001911: Delete attachment function doesn't delete anything on NT/IIS
Description

After clicking "delete" link, you notice a single line error in the continuation screen that says something to the effect it wasn't deleted "unlink failed (Permission denied)"... Exact text in addit'l info.

Problem is resolved by using chmod to remove the read-only setting to bug_file_delete. diff is in additional info.

Steps To Reproduce

Upload a file using Mantis on a NT4/IIS4 machine. Observe the file in the NT filesystem. Click the delete link, note the error and the persistence of the file.

Additional Information

Exact error message:
Warning: Unlink failed (Permission denied) in D:InetPubWebsmantisbug_file_delete.php on line 26

Resolution diff from 0.17.1, bug_file_delete.php:
26c26,28
< unlink( $t_diskfile );

  # mod by GRS 2 may 2002--add CHMOD statement to turn off read only mode
  chmod( $t_diskfile, 0775 );
  unlink( $t_diskfile );

Note: All the files are changed to read-only during the upload process. I don't recall the exact location, but I saw it in the source somewhere.

Thanks to all the users who contributed usage notes to the PHP manual page for chmod! <a href="http://www.php.net/manual/en/function.chmod.php">http://www.php.net/manual/en/function.chmod.php</a>

TagsNo tags attached.

Relationships

has duplicate 0001912 closedprescience Delete attachment function doesn't delete anything on NT/IIS 

Activities

gstarrett

gstarrett

2002-05-02 22:45

reporter   ~0002426

The same problem exists within proj_doc_delete.php, with an identical patch(just add the chmod line).

prescience

prescience

2002-05-06 18:49

reporter   ~0002446

Fixed in CVS. Will be in 0.17.2