LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Changing owner and group of file (http://www.linuxquestions.org/questions/linux-general-1/changing-owner-and-group-of-file-392005/)

surfbass 12-12-2005 01:40 PM

Changing owner and group of file
 
I don't really understand the syntax of 'chown' even after reading the man pages. It says 'chown [OPTION..OWNER[:[GROUP]] FILE'
I tried 'chown 770 root:notrust /home/notrust' and I get the following error: 'chown: cannot access 'root:notrust': no such file or directory.'


Could I get some help here? If you couldn't tell, I wanted root to own the 'notrust' dir, but also the group 'notrust' so other users could not access it.

Thanks


-SB

shooters 12-12-2005 01:59 PM

chown "new owner" "of what"...

so
chown root /home/notrust

and

chgrp notrust /home/notrust

Hope this helps...

shooters

RaelOM 12-12-2005 02:25 PM

Actually you're confusing chown and chmod.

chown root:notrust /home/notrust will work


THEN

chmod 770 /home/notrust


All times are GMT -5. The time now is 02:34 AM.