Check correct file system ownership and permission

leonep

Well-Known Member
Nov 18, 2014
163
8
68
Pescara
cPanel Access Level
Root Administrator
Hi guys,
I have noticed 1 directory on my system with non-correct ownership. Now i want to check all server.Where i can get a correct list to compare with my server?
..and if someone have bash script for compare and print anomalies on screen i will send a bottle of wine !
thanks ! have a nice day


my system:
Code:
/etc/redhat-release:CentOS release 6.9 (Final)
/usr/local/cpanel/version:11.68.0.13
/var/cpanel/envtype:standard
CPANEL=release
Server version: Apache/2.4.29 (cPanel)
Server built:   Nov  7 2017 03:54:43
ea-php-cli Copyright 2017 cPanel, Inc.
PHP 5.6.32 (cli) (built: Nov  7 2017 04:13:51)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Suhosin v0.9.38, Copyright (c) 2007-2015, by SektionEins GmbH
mysql  Ver 14.14 Distrib 5.5.58, for Linux (x86_64) using readline 5.1
 

24x7server

Well-Known Member
Apr 17, 2013
1,911
96
78
India
cPanel Access Level
Root Administrator
Twitter
Hi,

Where exactly you did see the wrong permission on your system? Is it in the /home or other location of the server?

You can refer to the below script documentation that cPanel has provided and look for things you want to accomplish..

WHM Scripts - Documentation - cPanel Documentation
 

cPWilliamL

cP Technical Analyst II
Staff member
May 15, 2017
258
30
103
America
cPanel Access Level
Root Administrator
Hi,

It may be easiest to spin up a fresh server to compare; however, if the file is managed by a package, you can verify if user/group ownership differs from the default with the 'rpm -V' command. For example:
Code:
# rpm -V -qf /etc/redhat-release
.....UG..    /etc/centos-release
We can see the User and Group differ from the default.

Thanks,