LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 02-27-2005, 01:40 AM   #1
pal
Member
 
Registered: Dec 2004
Location: india
Posts: 60

Rep: Reputation: 15
chmod ,chown ,chgrp------------


hello sir, We are not able to implement the commands chown,chmod ,chgrp.May be we are not aware of these properly.Kindly help us.
We are giving an example-----
The users test1 , test2, test3 are under group( named group1) .
The users test4 , test5 ,test6 are under group ( named group2).
Now with chmod command if we give
# chmod -R 770 test2
Then it means the group ( to which user test2 belongs to) will also have all permissions . So if we login as test1 ,we should access all the files of test2 user.But in the home directory of user test1 ,these files are not there.
Similarily if we issue the command
# chmod -R 777 test2
Then the group2 members should also access the files of user test2.But it is not happening.

------------
now we will consider chown command.
if we have one file named abc under test2 user then if we issue the command
# chown test1 /home/test2/abc
then the user test1 should be the owner of file abc.And this file should not be there under home directory of user test2.But it is not happening.
-------------------------
Now we will consider the command chgrp. If we issue the command
# chgrp group2 /home/test2/abc
Now the group2 members should have the access to file abc.But still this file is under the test2 .
we tried seeing some documents but we could not find it in detail.
 
Old 02-27-2005, 02:49 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,340

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
"Now with chmod command if we give
# chmod -R 770 test2
Then it means the group ( to which user test2 belongs to) will also have all permissions . "

chmod changes the permission of files and directories. It has no effect on group names or user names.

"if we have one file named abc under test2 user then if we issue the command
# chown test1 /home/test2/abc
then the user test1 should be the owner of file abc.And this file should not be there under home directory of user test2.But it is not happening."

chown does not move files. If you want to move the file abc to a different directory use the mv command.

"Now we will consider the command chgrp. If we issue the command
# chgrp group2 /home/test2/abc
Now the group2 members should have the access to file abc.But still this file is under the test2 ."

Yes, that is the way that the command is supposed to work. If you want to move the file abc to a different directory use the mv command.

------------------------
Steve Stites
 
  


Reply



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
Using chown, chgrp, chmod on a vfat partition? Rodolfo Medina Linux - General 7 08-17-2005 08:17 AM
Chmod ,chown ,chgrp commands not working proper---------------- pal Linux - Newbie 12 03-07-2005 09:55 AM
chown, chgrp Help Icarus1701 Linux - Newbie 1 10-25-2004 06:42 PM
Help: Directories magically chgrp and chown by themselves! Blazer79 Mandriva 2 09-07-2004 11:52 AM
problems with chown and chgrp apax Linux - Software 6 11-03-2003 03:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:22 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
Open Source Consulting | Domain Registration