[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PSPP-BUG: [bug #21280] gui truncates system files.

From: Ben Pfaff
Subject: PSPP-BUG: [bug #21280] gui truncates system files.
Date: Thu, 11 Oct 2007 15:41:31 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20070719 Iceweasel/ (Debian-

Follow-up Comment #9, bug #21280 (project pspp):

>There's no guarantee however that you'll have permission to create
>arbitrary files in the directory of the input file. Perhaps we 
>should fall back to /tmp, if the first attempt fails, and hope 
>that it's on the same filesystem. 

Does that solve anything?  To create a new file we need write permission in
the new file's directory.  To rename over an existing file, we need write
permission in the existing file's directory.  No?

The only way we could avoid needing write permission in the file's directory,
I think, is by opening the existing file and truncating it to length 0.  But
then we'd lose the contents that we need to read.  I guess we could copy the
file's contents to a temporary file and *then* truncate and overwrite it, but
I am not sure that that is really a winner for performance.

I do not think it is a common situation to want to write to a file in a
directory in which one does not have write permission.  Do you have a scenario
in mind?


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]