LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-29-2010, 09:25 PM   #1
wingman358
Member
 
Registered: Mar 2008
Location: Northeast US
Distribution: Mint, Ubuntu, Backtrack
Posts: 69

Rep: Reputation: 16
Can't write file despite proper permissions


Under debian i did this:

casey@t400:~/programs$ ls -l
-rw-rw-r-- 1 root root 2071 2010-03-28 05:15 urlgetter.cpp

Then

casey@t400:~/programs$ gedit urlgetter.cpp

and upon attempting to save the file, I get the error

"Could not save[...] You do not have the permissions necessary to save the file."

but I am a member of the group root:

casey@t400:~/programs$
cat /etc/group | grep root
root:x:0:casey




Any ideas?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-29-2010, 10:29 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
I'm wondering if gedit is trying to also write a backup file to that directory. Do have write permission to ~/programs/ ?

Another possibility is that you didn't logout/in after adding yourself to the root group.

Cheers,

Evo2.
 
2 members found this post helpful.
Old 03-30-2010, 10:36 PM   #3
wingman358
Member
 
Registered: Mar 2008
Location: Northeast US
Distribution: Mint, Ubuntu, Backtrack
Posts: 69

Original Poster
Rep: Reputation: 16
Thumbs up

Quote:
Originally Posted by evo2 View Post
I'm wondering if gedit is trying to also write a backup file to that directory. Do have write permission to ~/programs/ ?

Another possibility is that you didn't logout/in after adding yourself to the root group.

Cheers,

Evo2.


D'oh! I never logged out/in. That must've been the trick because gedit saves now without throwing any errors.

More interestingly, however:

casey@t400:~/programs$
ls -l
-rwxr-xr-x 1 casey casey 13349 2010-03-28 05:03 urlgetter
-rw-rw-r-- 1 root root 2071 2010-03-30 23:30 urlgetter.cpp
-rw-r--r-- 1 casey casey 2072 2010-03-30 23:30 urlgetter.cpp~

How can urlgetter.cpp's owner be root and urlgetter.cpp~'s owner be casey? I was under the assumption that gedit saved .cpp~ at the same time as the .cpp (and therefore as the same user).

Thanks for your helpful insight
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why cant the database create a new file with write permissions dappa_don Linux - Server 1 05-28-2009 03:38 AM
A normal user now has write permissions for the whole file system 16777216 Ubuntu 2 10-23-2006 09:32 AM
File write permissions of 777 and 755 wissyweb Linux - Security 2 01-24-2006 08:12 AM
cannot edit file as root with write permissions set? Mishley Red Hat 4 08-05-2004 12:23 PM
'Proper' file and directory permissions etherdeath Linux - General 5 03-02-2003 03:24 AM


All times are GMT -5. The time now is 07:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration