Bug 320142 - kate/kwrite refuse to overwrite writeable file in a read only directory
Summary: kate/kwrite refuse to overwrite writeable file in a read only directory
Status: RESOLVED DUPLICATE of bug 312415
Alias: None
Product: kate
Classification: Applications
Component: application (show other bugs)
Version: unspecified
Platform: Mageia RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-22 18:00 UTC by Deri James
Modified: 2013-05-22 22:37 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Deri James 2013-05-22 18:00:23 UTC
If you edit a file for which you have write permissions in a directory you don't have write permission, you cannot save the changes. Kate 4.10.2. In previous versions this was possible although a warning would be given about inability to create a backup (i.e. "file.txt~"), the option to try to save "file.txt" would succeed.

Reproducible: Always

Steps to Reproduce:
mkdir ro
chmod u=rwx ro             # Directory is writeable
echo "Read" > ro/file.txt # Create file.txt in ro directory
chmod u=rw ro/file.txt    # Ensure file is writable
chmod u-w ro                 # Remove write access to directory ro
kwrite ro/file.txt

Edit file and then save.
Actual Results:  
Error received:-

The document could not be saved, as it was not possible to write to /home/derij/ro/file.txt.
Check that you The document could not be saved, as it was not possible to write to /home/derij/ro/file.

Check that you have write access to this file or that enough disk space is available.have write access to this file or that enough disk space is available.

(Enough disk space is available)

Expected Results:  
It should warn that backup file "ro/file.txt~" cannot be created but give an option to attempt to save "ro/file.txt" which would succeed.

 kwrite --version
Qt: 4.8.4
KDE Development Platform: 4.10.2
KWrite: 4.10.2

Same behaviour is seen in kate as well.
Comment 1 Deri James 2013-05-22 22:37:42 UTC
A little hunting in the code shows this has been fixed in 4.10.3, sorry for the noise!

*** This bug has been marked as a duplicate of bug 312415 ***