I have 2 users: Joe is root and Gary (normal user). But if Gary enters 'cat /home/joe/function.php', he can view all code with mysql password into this file.

What is the solution for disabling all files for non-root user?

If I delete read permission for others with chmod i have error 503. Now all directory have drwxr-xr-x

I'm on debian 7

Thanks you

migrated from serverfault.com Aug 6 '15 at 3:36

This question came from our site for system and network administrators.

  • First of all, how can Joe "be" root? Set the file owner to Joe (or root) with chown, set the owning group to Joe (root) with chgrp, too. Then, set chmod ug=rwX,o=. – David Aug 5 '15 at 21:25
  • To all the people who voted to migrate this to U&L: this should've just been closed in place, not migrated. Remember the guideline: don't migrate crap. – Ward Aug 6 '15 at 3:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy