Operating System - HP-UX
1837143 Members
2259 Online
110112 Solutions
New Discussion

Deny multiple users access to files

 
SOLVED
Go to solution
Matt Rieman
Contributor

Deny multiple users access to files

Hi,

What's an easy way to deny multiple users access to certain files, and then giving them access again, all without having to make changes to each user?

Thanks
1 REPLY 1
Jeff Schussele
Honored Contributor
Solution

Re: Deny multiple users access to files

Create a group that none of the users belongs to.
groupadd -g xxx grpname
where xxx is a unique group ID
Change the group ownership on the file to this group
chgrp grpname file_names
& remove group priviledges from the file
chmod 600 file_names

Then just reverse this when you want to give them access back.

Hint: It would be simpler if all these files were in a specific directory. Then you could just change the perms on the dir.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!