In a company there are 3 groups i.e Finance, HR and Marketing. Each groups having 3 members. There is a file named as file1.txt. The permission set for the above file is rwx-rw----x. Now the question is only the members of Hr and Marketing group can view and edit the file. But the file is not accessible to the members of Finance Group. Can anyone tell me what would be the exact command for linux.root@localhost#<type the exact linux command>

Answer Posted / hems

let's say HR,MR,FIN are groups,
then,
#chown -R HR:MR file1.txt
#chmod -R 660 file.txt

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I check disk space in linux?

471


What is difference between egrep and grep?

518


You are required to restore the file memo.ben. It was backed up in the tar file MyBackup.tar. Which command would you use to do it?

532


What is clang format?

532


How is grep so fast?

570






What is the export command used for?

528


What signal is ctrl c?

518


Where is command history stored in linux?

538


What does mkdir mean in linux?

611


You need to see the last fifteen lines of the files dog, cat and horse. What command should you use?

536


Which command is used to delete a group?

561


What command is used to check the number of files, disk space, and each user’s defined quota?

522


How do I do a whois search?

563


Enlist some linux networking and troubleshooting commands?

523


How do I run a bash script in linux?

513