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

Re: File Permissions



Insane Boi wrote:
Unique question, Pidgin (aka gaim) has some configuration files. I would like to have these configuration files remain untouched/unmodified, but readable. I am running pidgin under a normal user account. Here is what I tried:

chmod 004 file.xml
sudo chown root:root file.xml

Launch pidgin as user -> In theory, pidgin would be able to read the file.xml, but unable to modify it. After pidgin launches, file.xml permissions become 600 owned by user:user and can be modified.

I don't understand this, as since the file is owned by root, and the user has no permissions to modify the file, how can a program running under that user's account modify and change the file permissions? Shouldn't the file permissions prevent the modification of this file?

Thanks.

Pidgin is probable deleting the original file and recreating it. My guess is that the directory still belongs to that user, so the user is free to delete any file in that directory (even though the file is owned by somebody)

You may want to try chattr to set the 'i' attribute on the relevant file.

--
Raj Kiran Grandhi
--
Politics is for the moment. An equation is for eternity.
                                       -- Albert Einstein


Reply to: