• Uncategorized

About linux : Any-command-to-check-all-files-and-folder-owner-group-and-permission-on-linux

Question Detail

I need a command to check all folder and files owner/ group permissions on linux server.

I have several websites and crons running the server. The idea is to get all files / folder in any website folder or crons having a owner apache. Which will list out the files and folder names whose owner is “apache” throughout the server

Question Answer

ls -R -l

However, I’d strongly urge you to go through sub-directories one at a time and not hit your server root with this command. You’ll be there a while and the output might be more than you can easily sort through at a go.

You can use find:

find /var/www/ -ls -user apache

-ls if for fancy output

also, there is

find /var/www -ls -not -user apache

to find all files that not belong to apache 🙂

You may also like...

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.