Hi,
I want any directory or file created in my home dir (/home/sabu) to be owned by me irrespective of who creates it. I always do root login and when i create a file in my home dir the owner is root. I dont want to do 'su sabu' and then create the file ( I may be using mozilla ->save file as... ) or chown it later. Is there any way by which i can set the default owner of files in /home/sabu to sabu and not root.......
regards, Sabu
Sabu Thaliyath wrote:
I want any directory or file created in my home dir (/home/sabu) to be owned by me irrespective of who creates it. I always do root login and when i create a file in my home dir the owner is root. I dont want to do 'su sabu' and then create the file ( I may be using mozilla ->save file as... ) or chown it later. Is there any way by which i can set the default owner of files in /home/sabu to sabu and not root.......
I'm not sure if you can force the owner of a file but you can enable the setgid bit on the directory like this:
chmod g+s /home/sabu
This will force all the files created inside to have their group set to the group of /home/sabu. Allow everything for the group and you won't need to su again and again.
That said, it's a very bad idea to surf the net as root.
-- Tahir Hashmi code_martial AT softhome.net http://www.codemartial.org
I have seen The Source
On Tuesday 29 Jul 2003 2:52 pm, Sabu Thaliyath wrote:
Hi,
I want any directory or file created in my home dir (/home/sabu) to be owned by me irrespective of who creates it. I always do root login and when i create a file in my home dir the owner is root. I dont want to do 'su sabu' and then create the file ( I may be using mozilla ->save file as... ) or chown it later. Is there any way by which i can set the default owner of files in /home/sabu to sabu and not root.......
use the application as sabu user, then that application will create the files with sabu as the user. any reasons why you use root login? why dont you login as sabu?
regards, Sabu