Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Permissions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Bigun
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 2198

PostPosted: Mon Dec 19, 2005 3:54 pm    Post subject: Permissions Reply with quote

I'm trying to make it so my preferences in GAIM would be impossible to change.

I went into my .gaim directory and made the following change:

Before:
Code:
-rw-------  1 bigun users 10434 Dec 19 10:48 prefs.xml


After:
Code:
-r--r--r--  1 root  root  10434 Dec 19 10:48 prefs.xml


Would you believe after starting Gaim, making a few changes and exiting I see this.

Code:
-rw-------  1 bigun users 10434 Dec 19 10:54 prefs.xm


How does gaim rewrite a root owned, read-only file?
_________________
"It's ok, they might have guns but we have flowers." - Perpetual Victim
Back to top
View user's profile Send private message
cokey
Advocate
Advocate


Joined: 23 Apr 2004
Posts: 3355

PostPosted: Mon Dec 19, 2005 4:03 pm    Post subject: Reply with quote

it probably doesn't change it, it probably gets deleted every time you close the application and a new one is created when you start it
_________________
https://otw20.com/ OTW20 The new place for off the wall chat
Back to top
View user's profile Send private message
morodoch
Guru
Guru


Joined: 22 Sep 2005
Posts: 523
Location: England

PostPosted: Mon Dec 19, 2005 4:04 pm    Post subject: Reply with quote

If something has write permission on a directory, it's allowed to delete & rename files in that directory. So if you really want to be safe here, chown the directory as well as the files.
_________________
Well, the Sister was right. You boys could use a little churching up. Slide on down to the Triple Rock, and catch Rev. Cleophus. You boys listen to what he's got to say.

-- Curtis
Back to top
View user's profile Send private message
Bigun
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 2198

PostPosted: Mon Dec 19, 2005 4:08 pm    Post subject: Reply with quote

Since the file lies within my home directory anyway, GAIM would still have permission to wipe it, even if I chown the .gaim directory.

So, how would a prevent my settings from being changed then?
_________________
"It's ok, they might have guns but we have flowers." - Perpetual Victim
Back to top
View user's profile Send private message
morodoch
Guru
Guru


Joined: 22 Sep 2005
Posts: 523
Location: England

PostPosted: Mon Dec 19, 2005 4:15 pm    Post subject: Reply with quote

Quote:
Since the file lies within my home directory anyway, GAIM would still have permission to wipe it, even if I chown the .gaim directory.


Depends how far up the tree it looks, if it just tries to delete it & recreate it, then removing write permission from the .gaim directory should do the trick - I doubt it tries to delete & re-create the whole tree every time.
_________________
Well, the Sister was right. You boys could use a little churching up. Slide on down to the Triple Rock, and catch Rev. Cleophus. You boys listen to what he's got to say.

-- Curtis
Back to top
View user's profile Send private message
Bigun
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 2198

PostPosted: Mon Dec 19, 2005 4:25 pm    Post subject: Reply with quote

Finally got it, however GAIM still keeps it's settings in local memory even though it doesn't change the Preference file....

So the settings will only be kept if things are restarted.
_________________
"It's ok, they might have guns but we have flowers." - Perpetual Victim
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20488

PostPosted: Mon Dec 19, 2005 7:14 pm    Post subject: Reply with quote

Depending on what FS it's on, take a look at chattr. With the correct chattr attributes, not even root can delete a file (until root changes the attributes).


Moved from Other Things Gentoo.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum