[GRASS-user] Error while removing file

Greetings

I'm trying to remove a file named new_clump@Area and I get this error:
[new_clump@Area] is a base map for [myscript.tmpV@Area]. Remove forced.
misc: couldn't be removed
I'm already using -f flag from g.remove function.
myscript.tmpV was a file that I generated from this new_clump. But, now I don't have that file in Area MAPSET ( I already checked in the Area folder) so I wasn't suppose to get this error.
How can I remove this raster without getting this nonsense error
Thanks

Best regards,
Antonio R.

__________ Information from ESET NOD32 Antivirus, version of virus signature database 5952 (20110314) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

António Rocha wrote:

I'm trying to remove a file named new_clump@Area and I get this error:
[new_clump@Area] is a base map for [myscript.tmpV@Area]. Remove forced.

"is a base map for" is just a warning; it doesn't prevent removal so
long as the -f flag is given.

misc: couldn't be removed

This indicates that there was some problem with removing the cell_misc
directory.

--
Glynn Clements <glynn@gclements.plus.com>

Ok it has removed but when I try to write over that file I get errors like Permission DENIED.
WHat can I do to fix this?

Glynn Clements wrote:

António Rocha wrote:

I'm trying to remove a file named new_clump@Area and I get this error:
[new_clump@Area] is a base map for [myscript.tmpV@Area]. Remove forced.
    
"is a base map for" is just a warning; it doesn't prevent removal so
long as the -f flag is given.

misc: couldn't be removed
    
This indicates that there was some problem with removing the cell_misc
directory.

__________ Information from ESET NOD32 Antivirus, version of virus signature database 5955 (20110315) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

António Rocha wrote:

Ok it has removed but when I try to write over that file I get errors
like Permission DENIED.
WHat can I do to fix this?

Ensure that all files and directories within the mapset directory are
owned by you, and have the necessary permissions (read and write for
files, read, write and execute for directories).

--
Glynn Clements <glynn@gclements.plus.com>

Hello Glynn
I'm running in WinGRASS in WinXP and I have total access to my folders (as far as I can see) but I get Permission denied for a specific folder in C:\grassdata\Area1\Country\cell_misc and ACCESS DENIED.
I have built a very long and "complex" Script with a lot of files production, deleting, opening external configuration files bla bla and now I'm getting this sort of errors when I try to overwrite over existing data or when I try to delete some files.
What might be happening?

Thanks
Antonio

Glynn Clements wrote:

António Rocha wrote:

Ok it has removed but when I try to write over that file I get errors like Permission DENIED.
WHat can I do to fix this?
    
Ensure that all files and directories within the mapset directory are
owned by you, and have the necessary permissions (read and write for
files, read, write and execute for directories).

__________ Information from ESET NOD32 Antivirus, version of virus signature database 5956 (20110315) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Hi again :slight_smile:

Ok the main problem is that I'm using r.statistics with base=new_clump10 and cover= myscript.tmpV1
If I try to remove new_clump I get:
g.remove -f rast=new_clump10@area
[new_clump10@area@area] is a base map for [myscript.tmpV1@area]. Remove forced.
Removing raster <LULC_new_clump10@National>
misc: couldn't be removed

So it wasn't removed. My question is:
1- Why it's repeating the Mapset information (new_clump10@area@area) That is odd right? Maybe that is what is messing with the system

Thanks
Antonio

Glynn Clements wrote:

António Rocha wrote:

Ok it has removed but when I try to write over that file I get errors like Permission DENIED.
WHat can I do to fix this?
    
Ensure that all files and directories within the mapset directory are
owned by you, and have the necessary permissions (read and write for
files, read, write and execute for directories).

__________ Information from ESET NOD32 Antivirus, version of virus signature database 5957 (20110316) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Just one small note:
If I try to remove tmpV I get this
Removing information about reclassed map from [new_clump10@area] failed
Removing raster <myscript.tmpV1@National>
And it's removed but then If I try to remove the new_clump10 I get:
[new_clump11@area@area] is a base map for [myscript.tmpV1@area]. Remove forced.
Removing raster <new_clump11@area>
misc: couldn't be removed
António Rocha wrote:

Hi again :slight_smile:

Ok the main problem is that I'm using r.statistics with base=new_clump10 and cover= myscript.tmpV1
If I try to remove new_clump I get:
g.remove -f rast=new_clump10@area
[new_clump10@area@area] is a base map for [myscript.tmpV1@area]. Remove forced.
Removing raster <LULC_new_clump10@National>
misc: couldn't be removed

So it wasn't removed. My question is:
1- Why it's repeating the Mapset information (new_clump10@area@area) That is odd right? Maybe that is what is messing with the system

Thanks
Antonio

Glynn Clements wrote:

António Rocha wrote:

Ok it has removed but when I try to write over that file I get errors like Permission DENIED.
WHat can I do to fix this?
    
Ensure that all files and directories within the mapset directory are
owned by you, and have the necessary permissions (read and write for
files, read, write and execute for directories).

__________ Information from ESET NOD32 Antivirus, version of virus signature database 5957 (20110316) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

António Rocha wrote:

Ok the main problem is that I'm using r.statistics with base=new_clump10
and cover= myscript.tmpV1
If I try to remove new_clump I get:
g.remove -f rast=new_clump10@area
[new_clump10@area@area] is a base map for [myscript.tmpV1@area]. Remove
forced.
Removing raster <LULC_new_clump10@National>
misc: couldn't be removed

So it wasn't removed. My question is:
1- Why it's repeating the Mapset information (new_clump10@area@area)
That is odd right? Maybe that is what is messing with the system

It appears to be a bug with something not correctly handling qualified
names.

Rast_put_reclass() is a likely candidate:

    sprintf(buf2, "%s@%s\n", name, G_mapset());

This should be e.g.:

  xname = G_fully_qualified_name(name, G_mapset());

which will only add the mapset if the name is unqualified.

Also, the "misc: couldn't be removed" is probably because
G_is_reclassed_to() doesn't close the cell_misc/<name>/reclassed_to
file. On Windows, you cannot delete a file if it's open.

Can someone check r45681 and back-port?

--
Glynn Clements <glynn@gclements.plus.com>

2011/3/16 Glynn Clements <glynn@gclements.plus.com>:
...

It appears to be a bug with something not correctly handling qualified
names.

Rast_put_reclass() is a likely candidate:

sprintf(buf2, "%s@%s\n", name, G_mapset());

This should be e.g.:

   xname = G\_fully\_qualified\_name\(name, G\_mapset\(\)\);

which will only add the mapset if the name is unqualified.

Also, the "misc: couldn't be removed" is probably because
G_is_reclassed_to() doesn't close the cell_misc/<name>/reclassed_to
file. On Windows, you cannot delete a file if it's open.

Can someone check r45681 and back-port?

I didn't test but backported (unsubmitted, see email in grass-dev).
This will hopefully solve the long term mystery of reclass files
sometimes not being deletable.

Markus