Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After upgrading to Fedora 18, I am no longer able to edit the files in my html folder using gedit. The files have the following permission:

-rw-r-----. me apache unconfined_u:object_r:httpd_sys_content_t:s0

Whenever I tried to save the file, a warning would appear:

Could not create a backup file while saving /var/www/html/my_file

gedit could not back up the old copy of the file before saving the new one. You can ignore this warning and save the file anyway, but if an error occurs while saving, you could lose the old copy of the file. Save anyway?

I am given the option to "save anyway" or "don't save". But no matter how I click to save it, the warning keeps appearing, preventing me from saving the file.

Since I am the owner of the file, shouldn't I be able to edit it? Not sure why I couldn't do so in this case.

share|improve this question
1  
Do you have write permissions in /var/www/html? Can you do touch /var/www/html/asd without problems? –  Peter Feb 25 '13 at 16:35
    
@Peter, ah, so that is the problem. –  Question Overflow Feb 25 '13 at 16:39
    
Why don't you paste it as answer? I can accept it. Thanks. –  Question Overflow Feb 25 '13 at 16:40

1 Answer 1

up vote 1 down vote accepted

The problem might be with directory permissions in /var/www/html

You should check that you're able to write to that directory so gedit can write a backup of the file your editing.

You can test it with touch /var/www/html/asd

share|improve this answer
    
I don't know why those previously set permissions on my html folder are somehow reverted mysteriously. –  Question Overflow Feb 25 '13 at 16:44
    
Maybe the webserver might have changed them if its run with another user. –  Peter Feb 25 '13 at 16:45
    
I am the only user :) Anyway its ok, thanks. –  Question Overflow Feb 25 '13 at 16:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.