[GRASSLIST:2312] GIS ERROR: error while writing to temp file: No such file or directory

Hi list,

While using i.ortho.photo and after giving the command for the rectification to start, i received a mail stating:

GIS ERROR: error while writing to temp file: No such file or directory

Any ideas on how to solve this?

My system is GRASS 5.3 and MacOS X 10.3.1 (Postfix is enabled)

Thanks

Konstantinos Theofilis

Edmund Blackadder wrote:

While using i.ortho.photo and after giving the command for the
rectification to start, i received a mail stating:

GIS ERROR: error while writing to temp file: No such file or directory

Any ideas on how to solve this?

The error indicates that the temporary file couldn't be created.

Temporary files are created using the template:

  <database>/<location>/<mapset>/.tmp/<hostname>/<pid>.<unique>

where:

<database>, <location> and <mapset> are the values entered in the
startup screen; these correspond to the GRASS variables GISDBASE,
LOCATION_NAME and MAPSET respectively (run "g.gisenv" to check their
values).

<hostname> is the system's hostname, according to either gethostname()
(if it exists) or uname() (otherwise).

<pid> is the process ID of the process which is creating the file.

<unique> is a unique integer which is added to ensure that filenames
are unique.

Some questions:

1. Does the temporary files directory (.../.tmp/<hostname>) exist?

2. Do you have write permission for that directory?

3. Are there any files in that directory for which you don't have
write permission?

4. Do you have write permission for the mapset directory?

--
Glynn Clements <glynn.clements@virgin.net>

HI and thanks for the help,

On 22 Jan 2004, at 05:47, Glynn Clements wrote:

Some questions:

1. Does the temporary files directory (.../.tmp/<hostname>) exist?

There is a .tmp dir that gets created in the right place when i run i.rectify under . And there is a hostname dir inside it

2. Do you have write permission for that directory?

NO.. I do not have w permission for .tmp/<hostname>

3. Are there any files in that directory for which you don't have
write permission?

4. Do you have write permission for the mapset directory?

I do

I changed the permissions recursively in the dir .tmp/<hostname>

But the problem still exists. Then i checked the permissions of the pid-named file inside <hostname> while i.rectify was working. The pid-named file does not have write permissions

How can i fix that??This file disappears after rectification stops.

Konstantinos Theofilis

Edmund Blackadder wrote:

> Some questions:
>
> 1. Does the temporary files directory (.../.tmp/<hostname>) exist?

There is a .tmp dir that gets created in the right place when i run
i.rectify under . And there is a hostname dir inside it

> 2. Do you have write permission for that directory?

NO.. I do not have w permission for .tmp/<hostname>

You need it.

> 3. Are there any files in that directory for which you don't have
> write permission?
>
> 4. Do you have write permission for the mapset directory?

I do

I changed the permissions recursively in the dir .tmp/<hostname>

But the problem still exists. Then i checked the permissions of the
pid-named file inside <hostname> while i.rectify was working. The
pid-named file does not have write permissions

Odd. Is your umask set incorrectly? Type "umask" in the GRASS shell to
see the current setting; "typical" values are 002, 022, 027 or 077,
but the first digit should always be zero (otherwise you are denying
yourself access to the files which you create).

Also, that appears to contradict your statement about not having write
permission for the .../.tmp/<hostname> directory; if you didn't have
write permission, photo.rectify wouldn't be able to create the
temporary <pid>.<unique> file there.

How can i fix that??This file disappears after rectification stops.

You don't actually need write permission for the temporary files which
are in use. However, a "stale" temporary file could cause problems
later. However, in light of the "No such file or directory" error, I
don't think that permissions on existing files are an issue here (that
would normally result in a "Permission denied" error).

Essentially, you should be the owner of your own mapset directories
(but not necessarily of the PERMANENT directory) and all files and
directories beneath them. All such files and directories should have
owner read and write permission, and the directories should also have
owner execute permission.

[Note: the GRASS startup won't let you select a mapset if you don't
own the directory, even if you have write permission for it.]

If you want to be able to create new mapsets, you also need write
permission for the location directories, and if you want to be able to
create new locations, you also need write permission for the database
directory.

For a single-user system, you may as well just run (as root):

  chown -R your_username /path/to/database
  chmod -R u=rwX /path/to/database

so that you own and have full permissions on everything within the
database directory.

--
Glynn Clements <glynn.clements@virgin.net>